1.) Write a short, pleasant letter, stating, as Andie mentioned, how lovely it was to work for the firm and how much you've gained professionally. Despite these pluses, you've received an offer you couldn't refuse: it's time to move on. Of course, you'll be more than happy to do any 'knowledge transfer' that's possible within the two week notice period (check your employment contract - if you have one - to verify that two weeks is acceptable).
2.) Request a meeting with your boss.
3.) Bring the letter to the meeting (if your boss is the blow-off type, routinely canceling meetings or pushing them into far future, and if this threatens to unnecessarily prolong your stay, you must be persistent: he/she'll get that some thing's up and, unless they're a complete ass tunnel, respond).
4.) Give your boss the letter. If you have a good working relationship and the department's budget is sound, there'll be some happy chat about the new job and 'if there's anything we can do to keep you happy here'. If you have a *really* good working relationship, there may be opportunities for consulting work at your old firm - a potentially nice side gig.
If you have a bad working relationship, it'll be tense either because:
a.) He or she is pissed the work you're doing will fall through the cracks, creating headaches and problems with upper management.
and/or
b.) He or she was planning to let you go during the next lay-off round, but your pre-emptive move makes that impossible.
5.) Write a pleasant goodbye email to co-workers and send on your last official day, before your mail server account has been suspended.
6.) Speed from the parking lot at a foolish velocity while playing Rammstein's "Mann Gegen Mann" from your car stereo.
.d.