The incident halted Djokovic's bid for an 18th Grand Slam title following a 26-0 start to the season.
"In accordance with the Grand Slam rulebook, following his actions of intentionally hitting a ball dangerously or recklessly within the court or hitting a ball with negligent disregard of the consequences, the U.S. Open tournament referee defaulted Novak Djokovic from the 2020 U.S. Open," the U.S. Tennis Association said in a statement.
"Because he was defaulted, Djokovic will lose all ranking points earned at the U.S. Open and will be fined the prize money won at the tournament in addition to any or all fines levied with respect to the offending incident."
After losing a game to his opponent -- Pablo Carreno Busta -- to fall behind 6-5 in the first set, Djokovic smacked a ball behind him as he walked to the sideline for the changeover. The ball struck a line judge, who fell to her knees at the back of the court and reached for her neck.
It appeared that Djokovic didn't intend to hit the line judge, as he was looking in a different direction when his racket connected with the ball. The Serbian also had a look of concern on his face and went over to help the woman.
But players who hit a ball out of anger and make contact with officials have been disqualified in previous years. On-court officials discussed the incident for several minutes before chair umpire Aurelie Tourte announced the disqualification.
"I was in shock," Carreno Busta said after the match. "I never expected this moment playing against Novak."
Djokovic's exit means there is no man left in the field who has won a Grand Slam singles title.
In other men's action, No. 5 seed Alexander Zverev earned a straight-sets win over Alejandro Davidovich Fokina to advance.
On the women's side, 23rd-seeded Yulia Putintseva reached the quarterfinals with a 6-3, 2-6, 6-4 win over No. 8 seed Petra Martic. No. 28 American Jennifer Brady beat 17th-seeded Angelique Kerber 6-1, 6-4 in their fourth-round match.
Unseeded American Shelby Rogers continued her remarkable run with an upset win over No. 6 seed Petra Kvitova. She picked up a 7-6 (5), 3-6, 7-6 (6) victory for her second berth in a Grand Slam quarterfinal and her first at Flushing Meadows.