One person was injured in the incident, AP Government Railway Police said.
The derailment occurred at around 2.30 AM near Mallunuru railway station, a GRP inspector said, adding due to rainfall in the area some boulders from the nearby hills fell on the tracks while the Mysore-Chennai (KaveriExpress) train was passing.
Three bogies, including one AC coach of the train, went off the track while its engine also got damaged when the boulders fell on it, he said.
"One person sustained minor injuries in the incident. Train services on the route got affected as boulders were still being cleared and track restoration work was under progress," the GRP inspector added.
Alternate arrangements were being made to enable the passengers to reach their destination.