It has adopted what is known as a "limited-duration shareholder rights plan", also known as a "poison pill".
The move will prevent anyone from having more than a 15% stake in the company.
It does this by allowing others to buy additional shares at a discount.
The Twitter board detailed its defence plan to the US Securities and Exchange Commission and put out a statement saying it was needed because of Mr Musk's "unsolicited, non-binding proposal to acquire Twitter".