Bobby Zamora's second-half goal gave West Ham victory in the Championship play-off final and a return to the Premiership after a two-year absence.
Tomas Repka hit the post and Carlo Nash denied Matthew Etherington as the Hammers started brightly in Cardiff.
Shaun Newton headed Richard Cresswell's effort off the line, while Zamora and Marlon Harewood went desperately close.
Zamora converted Etherington's cross and his team survived late pressure and keeper Jimmy Walker's injury to win.
It was a victory they just about deserved after playing the more fluent football and carving out the better openings.
Preston had done the double over the Hammers in the regular season, and finished above them in the table, but it was the Londoners who found their best form going into the play-offs.
They dominated possession in the early stages at the Millennium Stadium and played the ball around with pace and precision.
It should have reaped reward when Newton slid the ball through to the on-rushing Repka, but the Czech defender's well-struck effort smacked against Nash's left-hand post.
Zamora, who had endured a difficult season before coming to the fore in the play-offs, then showed his creative ability when he played in Etherington, who saw his effort palmed away by Nash.
Preston saw more of the ball as the half wore on but their best chance of success appeared to be from well-worked set-pieces.
None of these yielded clear strikes on goal and the lively Zamora could have punished Claude Davis for switching off just before the break, but the defender redeemed himself with a desperate tackle.
The Hammers, desperate to erase the memory of last season's final defeat by Crystal Palace, were almost caught cold soon after the restart.
Paul McKenna's corner was met by Cresswell but Newton headed his goalbound effort away.
It should have been 1-0 to Alan Pardew's men soon after when Nigel Reo-Coker's ball split North End's defence asunder.
Zamora was impressive throughout the play-offs for West Ham
Somehow, Nash kept out Harewood's initial effort, Zamora's shot from the rebound was hacked off the line by Davis, and Harewood's second strike was blocked.
But a breakthrough was not long in coming and when Etherington's cross fell to the feet of Zamora he made no mistake from six yards.
Zamora should have made it 2-0 when Etherington's free-kick found him completely unmarked in acres of space but he sent his header over the bar.
North End were struggling at the wrong end of the table when Billy Davies took over as manager last September.
And his team showed the resilience that helped them climb into the top six to fight back.
Their highly-rated striker David Nugent, who had been quiet for the first hour, fired straight at Walker, while Cresswell volleyed wide of the far post.
Cresswell then sent another header straight into the hands of Walker, whose day turned sour late on when he was carried off with a serious looking knee injury after charging out of his area and landing awkwardly.
Substitute Stephen Bywater's first job was to keep out a McKenna free-kick but there was little else for him to do afterwards.
Indeed, Mark Noble could have put the result beyond doubt in time added on, but it mattered little to West Ham fans that he fired wide.
For they were soon celebrating their return to the big time and belting out their favourite song I'm Forever Blowing Bubbles.
Their under-pressure manager Pardew, almost certainly on his way out if his side had lost, had guided them to the promised land of the Premiership.
Crestfallen North End supporters, whose team have been out of the top flight for 44 years, were left to ponder what might have been.
West Ham: Walker (Bywater 87), Repka, Ferdinand, Ward, Powell, Newton (Noble 82), Reo-Coker, Mullins, Etherington, Harewood, Zamora (Dailly 74).
Subs Not Used: Sheringham, Fletcher.
Booked: Mullins, Walker.
Goals: Zamora 57.
Preston: Nash, Mawene (Alexander 87), Davis, Lucketti, Hill, Sedgwick (Agyemang 71), McKenna, O'Neil (Etuhu 81), Lewis, Cresswell, Nugent.
Subs Not Used: Broomes, Ward.
Booked: Hill, Mawene.
Ref: M Riley (W Yorkshire).