Acts 18:21
But bade them farewell, saying, I must by all means keep this feast that cometh in Jerusalem: but I will return again unto you, if God will. And he sailed from Ephesus. But bade them farewell, saying, I must by all means keep this feast that cometh in Jerusalem: but I will return again unto you, if God will. And he sailed from Ephesus.
Paul came from Corinth to Ephesus while on his way to Jerusalem. He was traveling to Jerusalem to keep an approaching festival there. That festival was Pentecost.
His purpose to reach Jerusalem made his stay at Ephesus necessarily short. Even in that short stay he reasoned with the Jews in the synagogue, making so favorable an impression that they asked him to remain longer and continue teaching among them. He could not tarry because of his journey, but promised to return and labor with them again if God willed.
Aquila and Priscilla had come with him to Ephesus. He left them there to carry forward the good work he had begun, showing that his brief stay did not end his concern for the work in Ephesus. He then sailed from Ephesus.
He kept his promise to return after a brief visit to Jerusalem and time spent at Antioch, then traveling through Asia Minor visiting the churches he had established and strengthening the faith of the disciples before coming back to Ephesus. Antioch, where he spent time after Jerusalem, was the scene of his early labors. His return to Ephesus took place while Apollos was preaching at Corinth.