The loss was the Wolfpack's first in four Atlantic Coast Conference games.
Lorenzo Brown hit a jumper to put North Carolina State in front at 50-49 with 1:43 to play and neither side could score again until just before the buzzer.
The Wolfpack twice missed shots that would have extended their lead and Maryland took over with 15 seconds remaining when North Carolina State's Scott Wood misfired on a jumper.
Pe'Shon Howard attempted would have been a game winning shot with 3 seconds remaining, but it bounced off the rim. Len was there for the rebound and his follow shot brought Maryland the victory.
The result left Miami as the only team without a loss in the ACC at 3-0. The Hurricanes defeated Boston College on Wednesday.
Len was the only Maryland player to reach double figures in the defensive struggle, scoring 10 points. The Terrapins shot just 34 percent and North Carolina State hit 31 percent of its attempts.
Brown led the Wolfpack with 17 points and eight rebounds.