Following the lockout in 2004–05, Ozoliņš was dealt to the New York Rangers at the trading deadline for a third-round draft pick (which the Rangers had obtained earlier in a trade with the San Jose Sharks). With 14 points in 19 games in the 2005–06 season, Ozoliņš helped his team to advance to the playoffs, for which the Rangers had not qualified since 1997. In the next season on December 18, 2006, on the heels of a 6–1 loss to New Jersey, the Rangers placed Ozoliņš on waivers. After clearing waivers, Ozoliņš was assigned to the Hartford Wolf Pack of the American Hockey League (AHL), but a short while later was put on the injured reserve list due to a knee injury.