Robert W. McMillan, 72, a former government employe and Washington attorney who had been an area law school professor since 1971, died Wednesday at George Washington University Hospital after a heart attack.

He taught at the University of Baltimore law school from 1971 to 1975, then joined the faculty of the International School of Law in Arlington where he was a professor until joining the Potomac School of Law in Washington this fall.

Mr. McMillan was a native of Anderson, Ind. He came to Washington in 1931 and worked as an accountant with the General Accounting Office for five years before becoming an assistant legislative counsel in the Senate's office of legislative counsel. In 1941 he began a 30-year career as an attorney engaged in a general law practice in Washington and Northern Virginia.

He was a graduate of Ball State Univerity in Muncie, Ind., and earned a master's degree in business administraion at George Washington University. Mr. McMillan also earned bachelor's, two master's, and a degree in law at Georgetown University.

He had belonged to the University Club, the Washington Golf and Country Club and the St. Andrew's Society of Washington. He was a past master of the Mason's John Blair Lodge No. 187 and belonged to the York and Scottish Rite Bodies.

Mr. McMillan was a member of Trinity Presbyterian Church in He. had been a member of the Arlington County Republican Committee.

A resident of Arlington, he had lived in Northern Virginia since 1938.

His wife, Mary W., died in 1976.

He is survived by two sons, Robert, of Reston, and John, of Falls Church; a brother, James, of South Bend, Ind., and two grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the American Heart Association.