Regular trains will start operating on the line from next month between the stations of Makkah Al Mukarramah, Madinah, Sulaymaniyah in Jeddah and King Abdullah Economic City, while trains to Jeddah's King Abdulaziz International Airport will begin around mid-2019.
The line is aimed at doubling the number of visitors and pilgrims to the holy cities and is in line with Saudi Arabia's development plan, Vision 2030, to expand the economy and reduce its dependence on oil.
With a fleet of 35 trains carrying up to 417 people each, the service is expected to ferry around 60 million passengers yearly.
The distance between Mecca-Medina would be covered in less than two hours, which is less than half the time that it takes to cover the same distance by road.
A consortium comprising 12 Spanish firms along with two Saudi firms have been tasked with building the second phase of the project.