Grahame was born in Edinburgh, Scotland and after a minimal education worked as a labourer.
He migrated to Australia in 1858 and laboured on road work until he found employment as a tenant farmer and contractor.
He eventually kept a jewellery shop in Newcastle and served as an alderman on Wickham Municipal Council and as a member of the local water and sewage board.
At the 1889 election, he was the third candidate on the Protectionist list and won the last position in the multi-member seat of Newcastle.
However, Grahame was forced to resign from parliament in October 1889 when he became insolvent and he was defeated by James Curley at the subsequent by-election.