The 2007 finalist was forced to come back from two sets to one down and a break down to eventually beat fellow Serb Viktor Troicki 6-3, 3-6, 2-6, 7-5, 6-3 in over three-and-a-half hours.
Djokovic, who clearly struggled in the New York heat, now plays Philipp Petzschner, of Germany, in round two.
Sixteenth seed Marcos Baghdatis was the biggest casualty of the day as he went down 3-6, 6-2, 6-1, 4-6, 5-7 to Frenchman Arnaud Clement.
British No1 Andy Murray takes on Slovakian Lukas Lacko in his first round match at around 6pm today.
In the women’s, Jelena Jankovic was given a huge scare by 18-year-old Romanian Simona Halep, before digging deep to claim a 6-4, 4-6, 7-5 victory. She now plays Mirjana Lucic in round two.
But Brit Anne Keothavong was almost reduced to tears after she crashed out at the first hurdle, going down 2-6, 6-1, 6-1 to Yung-Jan Chan of Chinese Taipei