1:3-4 Just as I admonished you when I departed for Macedonia, remain in Ephesus so that you might command certain ones not to teach falsely, nor to hold to fables and endless geneaologies, which cause pointless speculations rather than the plan of God, which is by faith.
The precise grammar of 1:3 is not entirely clear, but Paul/1 Timothy seems to depict a situation where he was departing from Ephesus and leaving Timothy behind in the city. In terms of Acts, this scenario would best fit Acts 20:1-6, although Acts specifically includes Timothy among those who left for Macedonia with Paul. However, we do know of at least one other place where Paul himself depicts a sightly different scenario of who stays and who goes than Acts (Silas in Acts 7:14 and 1 Thess. 3:1).
Most of those who go with the literal Pauline authorship of 1 Timothy thus would locate the writing of 1 Timothy during a hypothetical fourth missionary journey after the end of Acts, after a suggested acquittal by Nero. Paul and Timothy would thus have found themselves at Ephesus yet one more time (in contradiction to Acts 20:25, 38). This suggestion is not without its problems as well, since the book of Acts has a foreboding sense in its final chapters that most straightforwardly would point to Paul's death after his appearance in Rome.
Those who would argue that 1 Timothy addresses a later generation of believers might thus see Acts 20:1-6 as the fictive setting of the letter. Such a setting would be poignant if Timothy ended up ministering in Ephesus for some length of time after Paul's death, indeed, if Ephesus were in fact the intended audience of the pseudonymous letter. In that case, it would even be possible that the letter was written for the churches at Ephesus, presumably with the recipients all well aware that the letter was not literally from Paul.
That false teaching later was considered a problem at Ephesus is confirmed by Paul's final words to the leaders of Ephesus in Acts 20:29-30. Since it is very likely that Acts was written after the destruction of Jerusalem and thus some time after Paul's death, its author would hardly have included these words if it were not what actually happened, from his (or less likely her) perspective. These verses speak of fierce wolves and distortions of the truth by individuals seeking to build a following.
The mention of "fables" and "endless genealogies" that are "vain speculation" is cryptic from our perspective, although presumably the meaning would have been clear enough to Timothy or the original audience of the letter. The mention of teachers of the Law in 1:7 implies that the fables and genealogies in mind relate to Judaism and the Jewish Law in some way. No attempt to identify the nature of the false teaching in question can be definitive. The fables (mythoi) in mind are not pagan myths. Some who favor a pseudonymous context have suggested Gnostic beliefs.
An interesting statement by Ignatius to the Philadelphians at the beginning of the second century says that "it is better to hear Christianity from a person having circumcision than to hear Judaism from the uncircumcision" (6:1). The implication seems to be that there were Gentiles in Asia at the time who criticized forms of Christianity for not being Jewish enough. Ignatius also acknowledges that the Ephesians have had trouble in the past with itinerant teachers who were teaching false things (Eph. 9:1).
In general, we do not have to restrict speculation about the Jewish Law to the Pentateuch. 1 Enoch and the book of Jubilees are likely proto-Essene and or Essene documents with exactly the kinds of speculations we could imagine Paul/1 Timothy referring to. These writings would have been in existence well before the time of Paul.
More important is the basic point, which is that God's plan, God's economy (oikonomia) is the way of faith. Is this an allusion to Paul's well known belief that justification is by faith rather than by works of the Jewish Law? It seems at least arguable that the sense here is that God's plan was to justify the nations and the Jews by faith. The false teachings, on the other hand, emphasize various traditions connected in some way to the stories of the Pentateuch.