An exclusion zone has been set-up around the site while expert engineers confirm the cause of the hole, as well as its full size and depth.
Services between Kilmarnock and Barassie will remain suspended with a replacement bus service in operation.
Trains between Ayr and Girvan/Stranraer, and between Glasgow Central and Kilmarnock will operate as scheduled.
Network Rail project manager Tom Podger said: “Holes like this are very unusual on the railway and we’re working with the Coal Authority to identify the cause, as well as finding a solution to make the railway safe for trains to pass again.
“We understand the inconvenience this incident will cause to some passengers, and I’d like to thank those customers for their patience and understanding while work continues.”
Journeys can be checked at https://www.nationalrail.co.uk/ or https://www.scotrail.co.uk/.