Millar studied at the University of Glasgow and in 1842 was admitted to the Faculty of Advocates.
He served two brief terms as Solicitor General for Scotland and in 1874 was appointed a Senator of the College of Justice. He served as an Advocate Depute, a Crown prosecutor in the High Court of Justiciary, from 1858 to 1859 and 1866 to 1867, before being appointed Solicitor General for Scotland, the country"s junior Law Officer, in 1867 in the Conservative government of the Earl of Derby. The prior holder of the office, Edward Gordon (later Lord Gordon of Drumearn) had been appointed Lord Advocate, the senior Scottish Law Officer.
Millar only held the office until February 1868, when the Earl of Derby was replaced as Prime Minister by Benjamin Disraeli.
He was appointed Queen"s Counsel (Queen's Counsel) in 1868. He returned to the office of Solicitor General briefly in 1874, again under Edward Gordon as Lord Advocate, before being appointed a Senator of the College of Justice, a judge of the Court of Session, the same year.
His judicial title was Lord Craighill, the name of his estate in Angus. He was awarded an honorary degree of Doctor of Laws by the University of Glasgow in 1875.
He lived at 2 Ainslie Place on the Moray Estate in Edinburgh"s West End.
He died in Edinburgh on 22 September 1888, at the age of 71.