Ndiaye weaved through a crowded box to fire home in the 79th minute and spark delirious scenes for the Championship side.
For Spurs and temporary boss Cristian Stellini, who started with Harry Kane on the bench, defeat means another season will pass without winning a domestic trophy.
But Sheffield United, well placed to join Tottenham in the Premier League, continue a stunning campaign and will eye further progress in the last eight.