Was there any mention of what to beware of for this megabeast? Any "Beware its deadly dust" or similar? That could make a difference in how you approach it.
I like the idea of building fortifications across your entrance tunnel (the 3 tile wide tunnel south of the depot). First off, use 'q' to select the doors in the outer (red) wall, and use 'l' to lock them. No, wait. First off, learn to create a burrow and get your civilians inside,
then lock the doors. The mega will break them down, but they will slow it down long enough for your masons to build the fortifications. Then draft your hunter into his own squad and station him just south of the fortification. Hmmm, if you have a spare rope, tie an animal up just north of the fortifications before you build them, to lure the mega down that far. He'll go after the animal and your hunter will pepper him with bolts. Avoid using critical breeding stock for this animal, since it won't survive.
So:
1) hit 'w' to go to the burrow menu and 'a' to add a new burrow. Then hit enter to define it. Hit 'n' to name it, I'd call it "Inside". Then hit enter to start a rectangle and enter again to finish it, just like designating areas to dig. Except that you can start on one level and end on another and it includes that rectangle on all of the levels, inclusive. Handy. Make as many rectangles as you need. Then hit ESC a couple of times to get out of the burrow menus.
2) hit 'm' to bring up the military menus, and 'a' for alerts. Now 'c' to add an alert and 'N' to name it. I typically used DEFCON1, but you might like something different. Now mover the cursor to the far right column, which should have the burrow you just created, and hit enter to associate that burrow with your new alert. You'll see a green A next to the burrow when you have that alert selected. Now move the cursor back to your alert and hit enter, and you should see a green [CIV] move next to it. Congratulations, your civilians are now confined to your burrow. (When the fight is over, come back and select "Inactive" and hit enter to cancel the alert and let your civilians back out of the burrow.)
3) If you have an extra rope or chain, une b->v to build it a few tiles north of that entry tunnel south of the depot.
3) Watch any civilians who were outside drop what they were doing and come running back inside. yay.
4) Once they're in, lock the doors with q->l
5) Once the rope/chain is built, assign a spare dog/cat/goat/mule/elephant to it and wait for it to get attached. Um, you might need to go back to your burrow and expand it to include the rope, if it doesn't already. Once the critter is on the rope, go back and remove that area from the burrow.
6) Now set up fortifications to be built like NecroRebel said. You might want to get this started while you're waiting for the sacrificial goat to get emplaced, but go ahead and suspend one of the "real" fortifications until your dwarf gets back from putting the animal out. Then unsuspend it.
7) Go to the military screen and create a squad with the archer uniform and put your hunter in it. If you have enough spare xbows and lots of bolts, toss a few other dwarves in it as well. But if you're short on bolts, just use the hunter, he'll waste fewer bolts.

Now use the 's'quad menu to station your hunter just south of the fortification.
The megabeast will spend a fair amount of time knocking down the door. It ought to be enough to get the fortifications built. If in doubt, skip the animal. But I'm not sure the megabeast will come close enough if you do.
Hmmm, you could build one of those statues just north of the fortifications instead. That would be quicker and would still draw the megabeast to it. I'm too lazy to go back and edit this to change everything, but substitute a statue for the rope and skip the animal in the instructions.
This should keep you nice and safe, while giving your hunter a good chance to kill the megabeast.