Moon Lord

The  is the final boss of the Celestial Event, and is also implemented as the final boss of Terraria. To summon the Moon Lord, the four Celestial Pillars must be defeated (Nebula, Solar, Stardust, Vortex). After the final pillar is destroyed, the message "Impending doom approaches..." appears at the bottom left of the screen. The screen will then begin to vibrate periodically with fading vision. Any background music that is currently playing is also dimmed. After about a minute, a white flash will appear unveiling the Moon Lord. Anything in the foreground (other than the Moon Lord) is darkened and starts blurring, while the background is completely darkened, until the fight ends. Note that it will not leave until the player wins or dies, even when teleporting long distances. Defeating the Moon Lord rewards the player with the "Champion of Terraria" achievement if all other bosses have been beaten already and drops a random weapon from the relevant pool, plus some Luminite used for the crafting of endgame items and armor.

Attack Pattern
The boss has 3 sections (2 hands and the head) that must be killed by attacking the eyes in the center before its core is exposed. Killing the core will defeat the boss. The eyes can only be damaged when they are opened, and they only open when attacking.

The central head eye (45,000hp) will open only occasionally to unleash a very powerful Phantasmal Death Ray that will sweep partly across the screen in the player's direction, doing massive damage. After the beam finishes, the eye will shoot several homing projectiles before closing again.

The eyes (25,000hp each) on both hands will be open most of the time as they are regularly churning out attacks. They will release homing missiles that chase after the player that do moderate damage. They will also summon large, invulnerable eyeballs and fling them at the player, doing moderate damage.

When an eye "dies" it will leave the hand/head as an invulnerable True Eye of Cthulhu. The True Eye will hover around the Moon Lord, releasing a variety of attacks that do moderate to high damage. All True Eyes of Cthulhu are identical, regardless of whether they spawned from the hand or head. Only when 3 True Eyes of Cthulhu are present (i.e all body parts destroyed) will the 50,000hp Core be exposed.

Throughout the fight, the Moon Lord will regularly extend a "tongue" that latches onto nearby players. It will then drain the player's life (the player does not lose health from this) in the form of white particles (Moon Leech Clots) that travel along the tongue. The particles are destructible and if a particle successfully reaches the Moon Lord, one of its body parts (any that have not been defeated yet) will regain 1,000hp. The Moon Lord will drain 3 particles before stopping. The tongue will not go through blocks, and the mouth will always be positioned above the player so that it can extend the tongue, even resorting to being directly behind the player if they are in a 2 by 3 space. If there are no blocks above the player, the mouth will always attempt to be about 10 blocks above them. As of 1.3.0.3, the Moon Lord will place the Moon Bite debuff on players when leeching them, causing them to be unable to regain health from weapons, such as from Vampire Knives or the lifesteal of the spectre armor.

General
It is usually a good idea to destroy the central head eye first. Firstly, the phantasm beam attack it uses can do over 100 damage even with high armor, although it can be dodged. Secondly, in general, the attacks from the True Eyes of Cthulhu are more dangerous than if they were left as the hands, as they do higher damage. It can be very difficult to survive both the attacks from the True Eyes while dodging the Phantasm Beam. Hence, destroying the hands before the head can leave players in a difficult situation.

Destroying the leeching particles should also be a top-priority as the boss can heal at a very fast pace with them. They are relatively easy to destroy.

If a player can obtain a mount from a Cosmic Car Key or a Shrimpy Truffle before the boss fight, it can make the fight much easier due to the unlimited flight they provide.

It is possible to obtain a higher speed than the Moon Lord itself, allowing players to kite it around the map while staying out of range of some of its attacks while pelting it with ranged weapons (tested with Beetle Armor, Spectre Wings, Frostspark Boots and a Cosmic Car Key)

If playing multiplayer have the host set their frame skip to subtle and stand near the nurse, because of the immense lag the Moon Lord can land very few hits and can't use the beam since to be with the nurse the host must be in her home. As the host takes damage have him heal at the nurse, since he can't easily die all the other players can dispatch him with as many deaths as they need.

Melee
Melee classes can be difficult to use against the Moon Lord, as the eyes generally stay out of the player's reach. However, melee weapons with a long range (such as spears) or shoot projectiles (like the Influx Waver) can serve as a good weapon. The Solar Eruption is the most effective melee weapon that is also easily obtainable before the Moon Lord fight, taking 18 Solar Fragments to craft with Solar Pillars dropping 25 at minimum. It has a very high damage-per-second and can be used from behind cover since it pierces through walls. This lets you avoid most of the Moon Lords attacks while still being able to damage him heavily in return.

Another strategy is to be in an NPC house that contains the nurse, grapple to the ceiling to make yourself invincible to knockback and aim the Solar Eruption at the Moon Lord's main eye and then use a sword that shoots projectiles (they hit the hands much more often) and aim out the door to take care of the hands and finish the core with the Solar Eruption.

(NOTE: Vampire Knives are not suitable as of 1.3.0.3, as the Moon Bite debuff makes the knives virtually useless as they cannot lifesteal.)

Drive-By like it's 1996 Approach (Ranged)
This strategy is possibly the easiest, but requires a great deal of preparation and patience, and several stacks of Chlorophyte Bullets. A Mechanical Cart is also strongly recommended, and essential when employing this strategy in Expert Mode. Armor should be Beetle Armor (with the Beetle Shell), or if Moon Lord has been beaten a few times already, the Solar Flare Armor, or Vortex Armor. Shroomite is acceptable if not in Expert mode. Chain Gun, Megashark, or Vortex Beater are the weapons of choice. If the player doesn't have enough Chlorophyte ammunition, make Crystal Bullets (area damage) or the most damaging bullets possible.

Another strategy is to use Phantasm with Holy Arrows. Since Phantasm creates trails once it's fired and locked to an enemy, it will make higher DPS. For easier dodging, wear Master Ninja Gear and ride UFO Mount using Cosmic Car Key.

Accessories should all be forged to Warding. Bonuses to speed do not affect Minecart travel.

To set up the Arena, make an above-ground cart track that runs at least two full screen lengths. The longer this track is, the better. At each end, create a "bumper" ending with a hammer. Then, go along the track and place platforms at eye level. This will serve as a platform for all of the Heart Statues, Star Statues, Campfires, and buff givers. The more statues the better. Wire the statues up to a 3 Second Timer or better.

Optionally, there can be row of blocks periodically above the track to serve as cover from the Moon Lord's beam attack, so long as there is a way to attack him back. Another variant is to use Pressure Plate Track with Teleporters to create a multi-level track arena to dodge in and out of cover, or at each end of the track to keep the movement direction constant.

The fight will consist of running away at top speed in the minecart and shooting backward and upward as the Moon Lord tries to catch up. When the cart hits the bumpers on the end of the track, the cart continues at the same speed in the other direction, freeing the player to concentrate on DPS and their own health. Using Chlorophyte ammunition gets the best results, as the Mechanical Cart travels 102mph at top speed, and the Moon Lord will teleport in largely off-screen behind the player. This method can take a long time, but as the player will stay out of range of most enemy attacks and only occasionally need to heal when hit by the eyebeam, it is one of the easiest.

Fight, Warp, Nurse, Repeat.
First you need to make sure your Nurse is near your spawnpoint. Then you do everything as normal, keeping the Moon Lord away from your spawnpoint, and only teleporting back if you can't use a potion and need to heal badly (for example, having 100 health and no potions). No matter how far you travel, the Moon Lord NEVER despawns. This will allow you to heal yourself in emergency cases and use your Nurse more often.

If you're on normal mode, you should teleport when you reach 200 or 250 health. In expert mode, that can up to 300 hp.

Only Working pre 1.3.0.4!

Trivia

 * This boss bears resemblance to Cthulhu, the deity created by H. P. Lovecraft. This is due to fan speculation prior to update 1.3 that Cthulhu itself would be the final boss of the game (hence the bosses Eye of Cthulhu and Brain of Cthulhu). Cenx later confirmed that the Moon Lord actually represents Cthulhu's brother. (He may be Hastur, Cthulhu's half brother in Eldritch mythology.)
 * The Moon Lord's brain appears to be a Brain of Cthulhu similarly colored to Ocram from the console and mobile version.
 * The Moon Lord's color scheme is identical to the Vortex Pillar and the enemies it summons.
 * Originally, the final boss of Terraria would've been the moon itself, but this was scrapped, probably due to being extremely similar to the Moon in The Legend of Zelda: Majora's Mask.
 * The Moon Lord's name is "Steve" confirmed by Re-Logic.