The Main North rail line is closed between Ardglen and Kankool in the Hunter Valley after two locomotives derailed on Wednesday night.
The Australian Rail Track Corporation (ARTC) said the incident occurred 7:50pm and involved a north-bound bank engine - a pair of locomotives used to assist a train up the steep grade towards Ardglen tunnel.
Emergency Services and ARTC staff attended the derailment site overnight.
The locomotive drivers were assessed by paramedics but suffered no injuries.
The site has been quarantined until safety investigators can attend the site this morning.
All rail traffic has ceased in the section between Ardglen to Kankool in any direction until further notice.
NSW TrainLink has advised the 8:05am Moree to Sydney and the 8:40am Armidale to Sydney XPLORER services have been delayed.
Buses will replaced the trains between Moree and Muswellbrook and Armidale and Muswellbrook. At Muswellbrook, customers will join the train for the remainder of their journey.
Similarly, the 9:30am Sydney to Armidale and Moree XPLORER train will only run to Muswellbrook, being replaced by buses from there onward.