Professor and revolutionary patriot
In late 1774, Andrews became one of the thirteen men (only a few clergymen), to sign a document drafted by eighty-nine former members of the House of Burgesses, which recommended a general congress as well as a non-importation association. The following year he joined the York County Committee of Safety in part to enforce that agreement.
As conflict with England worsened, the College of William and Mary in Williamsburg was thrown into turmoil. Professor of Moral Philosophy Samuel Henley fled to England. College President John Camm and two other professors were forced to resign. Only Rev. James Madison, who taught Natural Philosophy and mathematics (and was cousin of the future U.S. President of the same name) and James Bracken (master of the grammar school) remained by 1777.
In 1777, Rev. Andrews enlisted as a chaplain to the 2nd regiment of the Virginia militia under Col. George Gibson, and served until 1780.
In December 1777 Andrews accepted an appointment as Professor of Moral Philosophy at the College of William & Mary, but the college was often closed during the conflict. In October 1778, Andrews chaired the meeting to elect the Grand Master of the Grand Lodge of Virginia and became the deputy to John Blair Jr., who was a prominent local lawyer and who would become an Associate Justice of the U.S. Supreme Court in his final years. When the college was reorganized in 1779 under the guidance of Thomas Jefferson and George Wythe (who became the country's first law professor), the grammar school was closed, the professorship of oriental languages was abolished and Rev. Madison resumed teaching Moral Philosophy. However, Andrews retained his position, with the Law of Nature and Nations and the Fine Arts added to his teaching portfolio. Andrews became the first college professor in the new nation to have fine arts included in his professorship. Andrews published an almanac in at least 1781, 1783, 1794 and 1795. In 1784 he accepted the important mathematical professorship (the college certifying all surveyors in the new Commonwealth), and retained his position as professor until his death.
Williamsburg voters elected Andrews to their Committee of Safety in 1779, and soon afterward, he became one of the town's alderman. The college closed in late 1780 due to troop movements and the Battle of Green Spring before the Siege of Yorktown.