Officers were called to Stratford DLR station around 4.20pm on August 23.
When officers arrived and approached the man, he went onto the train tracks.
Police say that they asked the man to “to stay still for his own safety”, but tasered him when he did not listen.
Staff, paramedics and the fire service then helped police take the man to hospital as a precaution.
He was later arrested on suspicion of trespass, endangering the railway and a public order offence and then put into custody.
A BTP spokesperson said: “Officers were called to Stratford DLR station at around 4.20pm yesterday (23 August) after a man told station staff that he had a firearm.
“When officers approached the man he entered the tracks. Police taser was discharged after the man refused to listen to officer’s requests for him to stay still for his own safety.
“Officers worked with staff, paramedics and the London Fire Brigade to bring the incident to a safe conclusion.
“The man was taken to hospital as a precaution and later arrested on suspicion of trespass, endangering the railway and a public order offence before being taken into custody.”