OTTAWA—The chief adviser to Canadian Prime Minister Stephen Harper said he has stepped down, four days after the government said he gave an embattled Conservative lawmaker more than 90,000 Canadian dollars, or about US$87,540, to repay inappropriately claimed housing expenses.

Analysts see the loss of a key aide amid a scandal that has sparked negative headlines as a major blow to Mr. Harper, whose Conservative Party has governed...