Although I've never imported a BMW in to Canada, I did look in to the process a few years ago and these guys outline the general steps:
The RIV (Registrar of Imported Vehicles) who you will be dealing with to import the car has information here:
I don't think you'll have problems bringing in any BMW according to their admissable vehicle list:
Costs at the border will be $207 (RIV fee) + 5% GST + 6.1% duty (as the vehicle was made in Germany, not NAFTA eligible) + $100 air conditioner green tax. Once you have the car here, my understanding is you need to get it configured to meet Canadian road regulations (the Willz site quotes this as about an hour of shop labor), and then you can register it with the province (at which point they'll ding you for another 8% of the value.)
That's my understanding of the process - I'm sure someone else will reply if I've got something wrong...
Good luck, and enjoy the 540i - I loved my 2003 while I had it!