"I was trying to come in on an angle and waited until the very last second to shoot," said O'Sullivan. "I got lucky."
Patrick Kane was then denied his stuff attempt from the left side and Ales Kotalik sealed the win with a wrister into the right corner.
Dustin Penner had a goal and an assist while Roloson made 39 saves in the win for the Oilers, who have won three straight.
Martin Havlat had a goal and an assist and Khabibulin stopped 27 shots in the loss for the Blackhawks, who have dropped a season-high five straight and seven of their last eight.
"It's really disappointing and I'm really disappointed in myself," said Toews. "We're getting our game back slowly but surely and tonight we didn't come through."
With the win, the Oilers now have 79 points and moved one point behind Columbus for the sixth spot in the Western Conference while the Hawks remain in the fifth spot with 85 points.
Edmonton took a 1-0 lead just 3:12 into the game as Penner tipped in a pass from Denis Grebeshkov for his 15th goal of the season.
Chicago answered at the 7:41 mark of the first when Dave Bolland tipped a Brent Seabrook offering past Roloson.
The Oilers made it a 2-1 game halfway through the first on Andrew Cogliano's wrister, but the Blackhawks had the answer with 1:28 left in the first thanks to Adam Burish's sixth goal of the season.
Edmonton made it a 3-2 contest 6:03 into the second period as Ethan Moreau wristed the puck past Khabibulin, but Cam Barker's power-play goal with 2:29 left in the second tied the game.
The Oilers, though, took a 4-3 lead into the second intermission on Sam Gagner's 14th goal of the season with just 1:41 left in the period.
The Hawks tied the game 7:23 into the third period. Seabrook slapped a shot on net from the right point that Roloson stopped, but the rebound was kicked out to the left side where Havlat grabbed it, slid over to the slot and threw the disc into the net.
Toews had a chance to give Chicago the lead with 7:07 left in the game when he was awarded a penalty shot as he was slashed on a breakaway, but Roloson made a right pad save on Toews' wrister.
Edmonton ended regulation on the power play, which carried into the overtime, but were unable to score on the advantage and the five-minute extra session ended without a goal and the game went to the shootout.