Djokovic won his first meeting with Sandgren earlier this year and looked set for another comfortable evening when he won the first two sets 6-1 6-3.
But Sandgren refused to give up and the American took the third set in a tie-break.
In the fourth set, Sandgren fatigued and Djokovic broke twice to complete a 6-1 6-3 6-7 6-2 win.
The win means a match-up with Roger Federer in the quarter-finals remains possible after the Swiss star also reached the third round earlier today.
Novak Djokovic vs Tennys Sandgren LIVE
Fourth Set (*denotes server)
Djokovic* 6-1 6-3 6-7 6-2 Sandgren
Game. Set. Match.
Djokovic 6-1 6-3 6-7 5-2 Sandgren*
Djokovic is almost home and dry now. Sandgren broken for the second time in this set.
Djokovic* 6-1 6-3 6-7 4-2 Sandgren
Djokovic is nowhere near his best but he is doing just enough to stay in front.
Djokovic 6-1 6-3 6-7 3-2 Sandgren*
Bold tennis from Sandgren despite his weary legs. Big serves stop Djokovic’s momentum.
Djokovic* 6-1 6-3 6-7 3-1 Sandgren
Djokovic consolidates the break. The end is in sight for the Serbian.
Djokovic 6-1 6-3 6-7 2-1 Sandgren*
Sandgren is looking tired and Djokovic senses that. Two break points. Sandgren saves the first with a backhand cross court winner.
Saves the second with a forehand which barely clipped the line.
But Djokovic finally breaks through when Sandgren misses.
Djokovic* 6-1 6-3 6-7 1-1 Sandgren
Game Djokovic but Sandgren will have regrets with the last point as he misses a makeable pass.
Djokovic 6-1 6-3 6-7 0-1 Sandgren*
Big hold by Sandgren to start the game. Djokovic is not a happy man!
Third Set: Djokovic 6-1 6-3 6-7 Sandgren
3-0 lead for Sandgren as he hits some big groundstrokes. Breathtaking speed by Djokovic to chase down a Sandgren volley but the American hits back to go 4-1 up.
5-1 Sandgren as he hits another winner on the forehand. Djokovic’s head is gone and he misses a forehand to concede the set. Into a fourth we go.
Djokovic* 6-1 6-3 6-6 Sandgren
Good start by Sandgren as he wrongfoots Djokovic. Deep groundstrokes by Djokovic make it 30-15. Lovely drop volley by Sandgren to earn two game points.
Ace from Sandgren, his eighth of the match, forces a tiebreak.
Tennys Sandgren won the third set
Djokovic* 6-1 6-3 6-5 Sandgren
Djokovic is very wound up at the moment but he races through this service game. Pressure right back on Sandgren.
Djokovic 6-1 6-3 5-5 Sandgren*
30-30 as Sandgren misses a makeable volley. Djokovic forces a Sandgren error with an excellent return and gets a match point. SHOT! 88mph forehand winner from Sandgren.
Advantage Sandgren as Djokovic goes long and another miss keeps the American in the game.
Djokovic* 6-1 6-3 5-4 Sandgren
Djokovic’s level has definitely dropped but Sandgren is unable to take advantage. The Serbian needs one more game to reach the third round.
Djokovic 6-1 6-3 4-4 Sandgren*
30-0 for the American becomes 40-0 as he shows his speed to force a mistake and then he drives a backhand down the line to win the game.
Djokovic* 6-1 6-3 4-3 Sandgren
Normal service resumed as Djokovic holds his serve. Two games from victory.
Djokovic 6-1 6-3 3-3 Sandgren*
0-30. But Sandgren fights back to level at 30-30 with a forehand winner.
Break point Djokovic thanks to a brain freeze by Sandgren as he puts an attempted dropshot wide.
And Djokovic gets back level in the set after a Sandgren error on the forehand.
Novak Djokovic vs Tennys Sandgren LIVE
Djokovic* 6-1 6-3 2-3 Sandgren
Three break points for Sandgren. Total loss of focus by Djokovic. BREAK. Terrible attempted volley gifts Sandgren the advantage. Djokovic is fuming.
Djokovic 6-1 6-3 2-2 Sandgren*
Breathtaking athleticism by Djokovic to chase down a Sandgren dropshot and win the point. Two break points. Djokovic nets a backhand on the first.
Then a forehand return into the net. Big serve and forehand by Sandgren earns him game point but he double faults.
Good pass by Sandgren forces Djokovic to miss a volley wide. Another mistake by Djokovic gets Sandgren the game.
Djokovic* 6-1 6-3 2-1 Sandgren
30-30 but Sandgren nets a forehand. Careless. And his half-chance to break disappears as Djokovic drills another big serve past him.
Djokovic 6-1 6-3 1-1 Sandgren*
Gusty play from Sandgren including one excellent forehand pass. The American hasn’t played badly. Just been outclassed.
Djokovic* 6-1 6-3 1-0 Sandgren
A love service hold to start the third set by Djokovic.
Second Set: Djokovic 6-1 6-3 Sandgren*
30-40 after a Sandgren double fault. A reprieve for the American as Djokovic makes a rare error on the return.
Djokovic is too consistent in rallies and gets a second set point. Well saved by Sandgren. Stunning hustle to reach a Djokovic dropshot by Sandgren on another set point.
But there’s no easy points for Sandgren and he eventually succumbs as he makes another error. Djokovic well in control now
Djokovic* 6-1 5-3 Sandgren
Djokovic is in a groove at the moment and making a statement to the rest of the field. Another strong hold.
Novak Djokovic won the second set 6-3
Djokovic 6-1 4-3 Sandgren*
Djokovic is painting the lines with his returns in this game. Two break points. Sandgren’s backhand is called wide. He challenge but it is just wide and Djokovic moves ahead.
Djokovic* 6-1 3-3 Sandgren
30-30. Djokovic ace gives him game point. SHOT! Sandgren passes Djokovic at the net with a great forehand pass. But Djokovic bounces back and when he gets Sandgren on the run, it is always a problem.
Djokovic 6-1 2-3 Sandgren*
Big fist pump from Sandgren as he moves to 40-30. Frustration for Djokovic as he bounces his racket when he fails to get a backhand in play.
Djokovic* 6-1 2-2 Sandgren
Sandgren tries to apply some pressure but can’t keep the ball in play when he is stretched. Good hold for Djokovic.
Djokovic 6-1 1-2 Sandgren*
Relief for Sandgren as Djokovic is wayward on a couple shots. He needs to keep up with Djokovic for as long as he can.
Djokovic* 6-1 1-1 Sandgren
Pin point accuracy on serve from Djokovic. Finding the lines and corners every time.
Novak Djokovic won the first set
Djokovic 6-1 0-1 Sandgren*
Confident start to the set for the American. You feel he has to win this set if he has any ambitions of winning the match.
First Set: Djokovic* 6-1 Sandgren
A bit of fight from Sandgren as he gets to 15-30 with an excellent backhand pass. Djokovic moves to set point but goes long with a backhand down the line. Brilliant one-two punch from Djokovic brings him another set point but again he goes long with a backhand.
Djokovic eventually gets it done on set point number three.
Djokovic 5-1 Sandgren*
More break points for Djokovic and Sandgren has no answer to the Serbian’s returning. Double break!
Djokovic* 4-1 Sandgren
The confidence is flowing through Djokovic as he eases through another service game.
Djokovic 3-1 Sandgren*
Sandgren is having to do a lot of running and scrambling to keep up with Djokovic. But it is a miss match as Djokovic forces the American into an error and gets the break.
Djokovic* 2-1 Sandgren
After the struggles in the first game, Djokovic makes some adjustments and eases through this game.
Djokovic 1-1 Sandgren*
Another lengthy service game, this time for Sandgren. But he holds on narrowly despite Djokovic looking dangerous with his returns.
Djokovic* 1-0 Sandgren
In his opening service game, Djokovic slips to 15-40. He saves the first through a Sandgren error. Then the second with a big serve down the T. Djokovic gets a chance to win the game but goes wide with a backhand down the line. But after seven minutes, Djokovic eventually comes through.
00:01: Welcome to LIVE coverage of Novak Djokovic’s US Open second round clash against Tennys Sandgren.