The Sharks denied Leinster an opportunity to wrap up top spot in the United Rugby Championship with two games to spare in a hard-fought five-point win in Durban.
Leo Cullen's men came into the fixture with an eight-point advantage over closest challengers the Stormers and extending that margin beyond 10 would have been enough to earn the top seeding ahead of the play-offs and clinch the Irish Shield.
However, the visitors had to make do with a losing bonus point at Hollywoodbets Kings Park after a late onslaught failed to deliver the winning try.
Scott Penny and Tommy O'Brien had crossed for Leinster in the first half, although the tries were cancelled out by Makazole Mapimpi and Jaden Hendrikse respectively, with the visitors holding a 17-14 lead at half-time.
The Sharks kicked on in the second half with scores from Bongi Mbonambi and Phepsi Buthelezi as Leinster paid the price for a pair of yellow cards.
Curwin Bosch missed a couple of early penalties before Penny burrowed over for the game's opening try in the 17th minute, converted by Ciaran Frawley.
The Sharks responded almost immediately through Mapimpi's interception try and Bosch found his kicking boots to open his account with the conversion.
A Frawley penalty nudged Leinster back in front before O'Brien's touchdown put daylight between the sides.
O'Brien stepped inside Aphelele Fassi's attempted tackle and outpaced Werner Kok to race over, with Frawley adding the extras.
Having failed to halt O'Brien moments earlier, Fassi was the architect as the Sharks reduced the deficit to three in the closing stages of the half, splitting the defence open and feeding Hendrikse to run for home.
Frawley kicked a penalty early in the second half as the rain grew heavier but the Sharks had the lead after Mbonambi touched down from the back of a driving maul. Bosch converted despite the ball persistently slipping from the tee due to the weather, making it 21-20.
The advantage lasted only two minutes thanks to another Frawley penalty but Leinster quickly lost Josh Murphy to the sin bin and were temporarily down to 13 when debutant hooker Lee Barron saw yellow shortly after the hour.
The Sharks made their man advantage count after Murphy's return, with Buthelezi barging his way over from a maul after an extended period of pressure and Bosch converting.
A TMO review for a potential Bosch try eventually determined that Fassi's final pass had gone forward, although the full-back's foot appeared to be in touch before that point - an infringement flagged by the linesman but dismissed by the TMO.
The Sharks then had Kerron van Vuuren sin-binned as they desperately defended their lead late on but Leinster were held up over the line with their last chance to clinch victory.