The attack unfolded at around 8:00 pm when the officers asked the man, identified as Ismail Tommaso Hosni, for his documents as part of a routine check.
All three officers were hospitalised with stab wounds, but none of them are in a life-threatening condition.
Hosni, who was born in Milan and has dual Italian and Tunisian nationality, was arrested and faces possible attempted murder charges.
Italian authorities are investigating the attack, which they believe may be linked to terrorism.
Milan anti-terrorism investigators are working to establish whether a Facebook profile in the name of Ismail Hosni, containing at least one pro-ISIS video, belongs to the attacker.
The Facebook profile has been deactivated as part of the investigation process.
Milan Mayor Giuseppe Sala visited the injured railway police officer at Milan's Fatebenefratelli hospital following the incident.
"I call for peaceful participation from everyone to help us reflect on this important issue," Sala said on Facebook.
He also blasted those who blamed the attack on Italy’s immigration policies and called for Saturday’s Milan Without Walls march, a demonstration to express solidarity with migrants in Milan, to be scrapped.
Lombardy Governor Roberto Maroni, a member of the anti-immigrant Northern League, pushed for the event to be cancelled.
"I consider it opportune to cancel the pro-immigration march planned for tomorrow as a sign of respect for the security officers who are unfortunately exposed to life-threatening risks,” Maroni said.
Sala stressed that, despite Hosni’s father being from North Africa, the attacker was born in Italy and was as Italian as any other citizen.
"Despite this, some find it convenient to blame this criminal act on migrants in general," he added.
With ANSA