Harvard President Alan Garber wrote in a public letter on Monday that Harvard had received demands from the federal Department of Education.
"No government - regardless of which party is in power - should dictate what private universities can teach, whom they can admit and hire, and which areas of study and inquiry they can pursue," he added.
The Department of Education did not immediately respond to a request for comment.
Garber's letter was in response to the department making a series of demands of Harvard, including that it shut down diversity, equity and inclusion programs and launch audits of some of its academic departments.
President Donald Trump's administration has frozen hundreds of millions of dollars in federal funding for numerous universities, pressing the institutions to make policy and other changes and citing what it says is a failure to fight anti-Semitism on campus.
The crackdown has raised concerns about speech and academic freedoms.
The issue erupted before Trump took office for his second term, following pro-Palestinian student protests last year at several universities following the 2023 Hamas attack inside Israel and the subsequent Israeli attacks on Gaza.
White House spokesman Harrison Fields said in a statement that Trump was "working to Make Higher Education Great Again by ending unchecked anti-Semitism and ensuring federal taxpayer dollars do not fund Harvard's support of dangerous racial discrimination or racially motivated violence".
Last week, a group of Harvard professors sued to block the Trump administration's review of nearly $US9 billion ($A14 billion) in federal contracts and grants awarded to the school.
The Trump administration is reportedly considering forcing fellow Ivy League school Columbia into a consent decree, that would legally bind the school to follow federal guidelines in how it combats anti-Semitism.
Some Columbia professors, like those at Harvard, have sued the federal government in response. The government has suspended $US400 million ($A633 million) in federal funding and grants to Columbia.
Garber said the federal government's demands that it "audit" the viewpoints of its students, faculty and staff to ferret out left-wing thinkers generally opposed to the Trump administration clearly violated the university's First Amendment rights to freedom of speech.
"The University will not surrender its independence or relinquish its constitutional rights," he wrote.
He added that while Harvard is taking steps to address anti-Semitism on campus, "these ends will not be achieved by assertions of power, unmoored from the law, to control teaching and learning at Harvard and to dictate how we operate".
Harvard agreed in January to provide additional protections for Jewish students under a settlement resolving two lawsuits accusing the Ivy League school of becoming a hotbed of anti-Semitism.
To ease any funding crunch created by any cutoff in federal funding, Harvard is working to borrow $US750 million ($A1.2 billion) from Wall Street.