The west Cork side looked to have booked their place in round three as they played out the closing minutes with a two point lead.
However, in a final attack, O’Brien rifled home the winning goal and Ilen were left to rue their missed chances.
The Blackpool side went into the game as rank outsiders against a side that included three county senior players in Diarmuid Duggan, Kevin O’Sullivan and John Wycherley, yet still managed to snatch a victory they deserved.
It was a typical battling performance by the city side. Six times in the opening half they were level but began to struggle when Rovers stepped up a couple of gears on the changeover to take a three point lead at the three quarter stage.
It looked as if Nicks were doomed to the scenic route. However, they refused to lie down and in a grandstand finish they rocked Ilen with a goal out of nothing.
All the Nicks players were heroes on the night, but the performances of full-back Donal Og O’Donovan, centre-back Niall Horgan. midfielders Paul O’Brien and David Brosnan, as well as John Kearney and Graham Callanan, deserve special mention.
There was little to choose between the teams in a free-flowing first half. The sides were tied at 0-6 apiece at the interval.
In that opening half, Rovers created the game’s only goal chance when Jason Whooley broke through, but with only the goalkeeper to beat, he blazed over from 12 metres.
The introduction of Kieran Daly for the second half improved the Rovers attack, but the same fluency wasn’t in the game as the tackles went in hard. Three points in a row put daylight between the sides as Daly and Brian O’Sullivan began to create and finish the openings.
As darkness began to descend, Rovers appeared likely winners. But Nicks wouldn’t give up the chase and through sheer persistence had the deficit down to the minimum with points by Kearney and Horgan.
Back came Ilen with two points of their own. Again Nicks wouldn’t capitulate and in those hectic closing minutes points by David Cunningham and David Brosnan left just one between them with two minutes remaining.
A draw looked likely as Nicks pressed forward looking for the equaliser, but, in a breakaway attack, Conor O’Driscoll looked to have won the game for the west Cork side when he landed a point.
However, in one last attack, the ball was played into Paul O’Brien and he stepped inside a couple of despairing tackles before unleashing an unstoppable shot into the roof of the Rovers net for the winner.
Rovers now face a tricky local derby clash with neighbours O’Donovan Rossa in round two.
: St. Nicks: P. O’Brien 1-2; J. Kearney 0-2 (frees); D. Brosnan, N. Harte, G. Callanan, N. Horgan, D. Cunningham, D. Busteed 0-1 each. Ilen Rovers: J. Whooley, B. O’Sullivan, K. O’Sullivan (frees), K. Daly, C. O’Driscoll 0-2 each; F. Collins, D. Duggan 0-1 each.
: P. Cuthbert; S. O’Donoghue, D. Og O’Donovan, S. Kenefick; L. Leahy, N. Horgan, D. Cunningham; P. O’Brien, D. Brosnan; G. Callanan, D. Busteed, G. Moylan; D. Dorris, N. Harte, J. Kearney. Sub: E. McCarthy for Moylan.
: G. Coakley; D. Murphy, D. Duggan, S. Holland; J. Sheehy, D. Harman, D. Whooley; F. Collins, D. Cunningham; J. Wycherley, E. Sheehy, J. Whooley; B. O’Sullivan, C. O’Driscoll, K. O’Sullivan. Sub: K. Daly for D. Whooley.
: P. O’Leary (Kilmurry).