Craig Fulton's side had lost their three previous matches
Team Ireland have picked up their first win of the Men's Olympic Hockey tournament.
Craig Fulton's side beat Canada 4-2, having lost their first three matches.
The result means Ireland are now fifth in Group B on three points from four games, with a match against fourth-placed Argentina in Group B to come on Friday.
Ireland got off to a fast start against Canada with two Shane O'Donoghue penalty-corners putting Fulton's side in control with a 2-0 lead.
Peter Caruth converted an effort at the far post to put Ireland 3-0 up and coasting towards victory.
But Canada fought back with two goals of their own to set up a nervous finish for Ireland.
However, breathing space was restored by Mitch Darling who added a fourth.
Ireland play Argentina on Friday.