Michu had threatened to spoil the party after Chicharito's opener, but the Red Devils' greatest-ever manager ended his reign at Old Trafford with a typically well-timed victory.
Javier "Chicharito" Hernandez poked home close to halftime after an Ashley Williams mistake, but Michu struck soon after the break, exposing a slight lack of verve from United as the momentous occasion occupied the foreground.
In typical Ferguson fashion, though, the Red Devils rallied late on and Ferdinand delivered the fairytale ending when he capitalized on a poorly defended corner for his first goal since 2008.
Scholes lined up for his final home game in a strong team, though Wayne Rooney was excluded from the squad and watched from an executive box as all three of United's other frontline strikers started. Neil Taylor and Michu returned for Swansea while Gerhard Tremmel stood in for Michel Vorm in goal.
Welcomed onto the pitch by a storm of cheers and flags, Ferguson accepted the adoration of Old Trafford before making way, and United started the game aggressively, Chicharito nearly opened the scoring within four minutes when his acutely angled shot came off the underside of the crossbar.
However, the game died down in spite of the occasion, neither side impressing and United occasionally over-elaborating their attacking play.
Finally, though, the hosts got the goal that the day demanded. In the 39th minute, Robin van Persie delivered from a free kick and caught out Williams, whose had the ball bounce off his shin and into the path of Chicharito. The Mexican poked it underneath Tremmel even as he fell back on the wet pitch.
It was nearly two before halftime as Van Persie took aim with his left foot but the Swans keeper deflected it away, United's lead at the break a slender one.
Any chance of a procession evaporated just after the restart, however, when Michu darted in front of the diving Phil Jones and dispatched Nathan Dyer's cross past David de Gea with a clever mid-air finish off the outside of his left boot.
Swansea was a whisker away from a second shortly after when Wayne Routledge nudged his shot just wide of the far post, having been put through down the left by a one-two with Michu. Despite everything, Swansea had more purpose and De Gea had to deny Pablo Hernandez just after the hour mark in a threatening break.
Needing to wake up, United riposted at last but Danny Welbeck's low cross fizzed just out of the lunging Chicharito's reach.
Then came Scholes's goodbye, withdrawn in the 66th minute to a raucous salute but modestly refusing to milk it, sharing only a simple handshake with his manager. His replacement, Anderson, nearly took the roof off when he blasted a long-range just wide.
There was time, too, for a fitting appearance off the bench from Ryan Giggs as the half wore on, Ferguson's most faithful servant there at the last.
It was a more unlikely figure who secured the victory, however, with Ferdinand hammering home his first goal in five years to delight the Old Trafford faithful and his ecstatic boss. As usual, Ferguson's United had found a way in the end.