The new rule would imperil international students if their universities switch to online-only courses in the fall due to the coronavirus pandemic.
The lawsuit seeks a temporary restraining order and preliminary and permanent injunctive relief to bar the U.S. Department of Homeland Security and Immigration and Customs Enforcement (ICE) from enforcing the federal guidelines released on Monday, according to the Harvard Crimson newspaper.
"The order came down without notice -- its cruelty surpassed only by its recklessness," Harvard president Lawrence Bacow wrote in an email to affiliates.
"We believe that the ICE order is bad public policy, and we believe that it is illegal," he added.
The lawsuit, filed in the U.S. District Court of Boston, came as guidelines released Monday by the ICE vowed to invalidate foreign students' F-1 and M-1 visas if the educational institution they are enrolled in only offers online courses this coming fall, possibly depriving them from legally remaining in the United States.
Students facing such a situation "must depart the country or take other measures, such as transferring to a school with in-person instruction to remain in lawful status," the release said.
Those who violate the rules "may face immigration consequences including, but not limited to, the initiation of removal proceedings."
"(The) ICE's action proceeded without any indication of having considered the health of students, faculty, university staff, or communities ... or the absence of other options for universities to provide their curricula to many of their international students," the lawsuit by the two prestigious universities reads.
"We believe that the ICE order is bad public policy, and we believe that it is illegal," he added.
Harvard announced Monday it will only allow up to 40 percent of undergraduates, including all first-year students, to return to campus for the fall semester. The rest of the students will continue to learn remotely.
Meanwhile, MIT said Tuesday seniors will be the only undergraduates to be invited back to campus this fall. Non-seniors may "request special consideration for housing if they face challenges related to safety, living conditions, visa status, or other hardship," the university said in a plan posted on its website.