Devyani's arrest had caused tensions in US-Indian diplomatic relations.
Devyani was India's deputy consul-general in New York when she was arrested by US police. She had diplomatic immunity when she sought on January 9 to dismiss the indictment, and thus could not be prosecuted, US District Judge Shira Scheindlin in Manhattan ruled on Wednesday.
Prosecutors had accused Khobragade of making Sangeeta Richard, her housekeeper and nanny, work 100-hour weeks at a salary of just over $1 an hour, far below the legal minimum US wage of $7.25 an hour. They argued that the indictment should stand because Khobragade did not have diplomatic immunity either when she was arrested.
39-year-old Devyani left US soon after she was released from jail. She is now in Delhi, at Indian Foreign Affairs Ministry.
Scheindlin said, however, Khobragade had that immunity on January 9 when the indictment was issued, having the day before been named a counselor to India's mission to the United Nations.
"Even if Khobragade had no immunity at the time of her arrest and has none now, her acquisition of immunity during the pendency of proceedings mandates dismissal." she wrote. "The government may not proceed on an indictment obtained when Khobragade was immune from the jurisdiction of the court," Scheindlin wrote.
She also lifted Khobragade's bail and said open arrest warrants based on the indictment must be thrown out.
"As the court indicated in its decision, and as Devyani Khobragade has conceded, there is currently no bar to a new indictment against her for her alleged criminal conduct, and we intend to proceed accordingly," said James Margolin, a spokesman for US Attorney Preet Bharara in Manhattan.