The Orange led by 12 points in the second half, but Maryland stormed back, drawing to within 56-55 with 47.7 seconds to go on steal and subsequent free throw by Jake Layman.
After Syracuse's C.J. Fair missed a jumper on the next possession, Keita blocked Nick Faust's potential go-ahead shot and Orange (26-2, 13-2, ACC) held on to break a two-game losing streak.
With the victory, Syracuse pulled within one game of Atlantic Coast Conference-leading Virginia. The Orange play at Virginia Saturday.
The Terrapins (15-13, 7-8) were paced by Seth Allen with 22 points.
Dez Wells provided 15 points and seven rebounds.