A by-election in the Moray constituency of the Scottish Parliament was held on 27 April 2006 following the death of the Scottish National Party (SNP) Member of the Scottish Parliament (MSP) Margaret Ewing on 21 March 2006, from breast cancer. The seat was successfully defended by the SNP's Richard Lochhead, increasing the majority over the Scottish Conservative Party by 1073 votes.
Margaret Ewing had held the Holyrood seat since its creation in 1999, having previously represented the Moray constituency as a Westminster Member of Parliament (MP) since the United Kingdom general election, 1987. She had already announced that she would not be contesting the seat in the Scottish Parliament general election, 2007.
Richard Lochhead defended the seat for the Scottish National Party. An additional-member MSP for the North East Scotland electoral region since 1999, he had already been selected to contest the seat for the SNP at the Scottish Parliament general election, 2007, beating the incumbent's sister-in-law, former MP Annabelle Ewing. He resigned his list seat to stand in the by-election.