The man, identified by his family name Yoo, was heading from Euijeongbu to Seoul when the incident happened, Yonhap news agency reported Saturday.
Police officer Oh Yoon-hui said Yoo started his alleged attack when the train was about 14 miles outside of the capital. Seven people were injured.
The suspect then got off the train and ran just under 400 feet before police caught up with him, Oh said.
Yoo's motive was not immediately clear, Oh said.