Pirie's first foray into politics was an unsuccessful bid as the Liberal candidate for West Renfrewshire at the 1895 general election. A year later, the resignation of William Hunter led to a by-election for the constituency of Aberdeen North.
Pirie made his first political venture with an unsuccessful run as the Liberal party candidate in West Renfrewshire during the 1895 general election. Following William Hunter's departure, a by-election was held for Aberdeen North due to his resignation.