Several players have already pulled out of the tournament, including four-time winner and defending champion Rafael Nadal, due to coronavirus fears.
But the world number one, who tested positive for Covid-19 in June following the controversial Adria Tour, wrote on his website: "I am happy to confirm that I will participate at the Western & Southern Open and US Open this year.
"It was not an easy decision to make with all the obstacles and challenges on many sides, but the prospect of competing again makes me really excited.
"During my career, I have played some of my best matches at the USTA Billie Jean King National Tennis Center. I am aware that this time around it will be very different with all the protocols and safety measures that are put in place to protect players and people of NY.
"Nevertheless, I have trained hard with my team and got my body in shape so I am ready to adapt to new conditions. I've done all the check-ups to make sure I am fully recovered and I am ready to get back on court fully committed to playing my best tennis.
"I respect and appreciate everyone taking time, effort, and energy to organize these two events for the tennis players to be able to go back to their working field.
"Unfortunately for the players and the game itself, the current situation is not allowing everyone to travel and compete at the same level of risk, and I hope the situation will change soon and we will all be back to doing what we love and do best."
Djokovic will also compete in the Western & Southern Open, which is usually held in Cincinnati but will be played at Flushing Meadows from August 22-28.
The US Open gets under way at the same venue three days later. Both tournaments will be played without fans in attendance.