The incident involved an eight-vehicle London Overground service at Anfield Town Station during Tuesday morning rush hour.
Pictures posted on social media showed the train standing straight but derailed and stopped shortly after hitting the station building.
One passenger said there was “chaos” because services between Enfield Town and Edmonton Green were suspended.
He tweeted: “Just there and chaos at the door. The train reached Enfield Town and hit the buffers.
“Luckily I didn’t go through the station window.”
The London Fire Brigade said Transport for London (TFL) personnel evacuated about 50 people before emergency services arrived.
Station Commander Jim O’Neill, who was at the scene, added: “The train hit the buffers at the station, which is at the end of the line, and climbed over them.
Firefighters conducted a thorough search of the train to make sure there were no more people on board.
The staff assisted the station staff in securing the scene and conducting a rehabilitation operation.
The brigade said three fire engines and two fire rescue units were called to the scene at 8.27am and the fire was extinguished for firefighters an hour later.
A spokesman for the London Ambulance Service said: “We were called at 8.16am this morning to report derailment at Anfield Town Railway Station, Anfield.
“We sent several resources to the scene: an ambulance crew, an emergency planning officer, a clinical team manager, two incident response officers, in-car medical staff, and our effective area response team.
“Two people were diagnosed with minor injuries at the scene, but were not taken to hospital.”