Ainlay first sought public office in the 1930 Edmonton election, when he ran for alderman on Edmonton City Council and was defeated, finishing ninth of twelve candidates.
As mayor, Ainlay introduced daylight saving time in the city in 1946 after city residents voted in a plebiscite in favour of the change and after the Government of Alberta refused to bring it in province-wide.