As the bus left a stop last night, the man took out the knife and started stabbing the passengers in the bus running through the downtown Chengdu, capital of Sichuan, the city's public security office told state-run Xinhua news agency.
The driver stopped the bus and opened the doors so passengers could escape.
The man, surnamed Li, got off the bus soon and continued attacking people on the street before police shot him in the leg and overpowered.
According to Chengdu police's initial investigation, the 41-year-old suspect is from Jintang County to the northeast of Chengdu City.
More From This Section
He told police that he has worked as migrant worker elsewhere and has financial disputes with his family members.
Li left Xichang City in southwest Sichuan Province last Thursday, went home in Jintang on Saturday, and arrived in Chengdu on yesterday, said the police.
This is the second such attack in a bus in recent weeks and one among many random knife attacks by disgruntled people who try to resort to violence to highlight their problems.