Due to ill-health he was educated by his mother then sent to Glasgow aged 14 to study divinity at the University of Glasgow under Prof James Mylne. However, he did not find Glasgow to his liking as a city and stayed there only one year. He completed his studies at University of Edinburgh, graduating at Divinity Hall in 1843. This was a tumultuous year in the Scottish church, and Fraser decided to join the Free Church following the Disruption. He was ordained in 1844 and became minister of the small parish of Cramond on the Firth of Forth just on the outer edge of Edinburgh. Remaining in Edinburgh he succeeded Sir William Hamilton as professor of logic at New College in 1846 and remained in this role until 1856.