Moon Lord

The  is implemented as the Final Boss of Terraria. To summon the Moon Lord, you need to defeat the 4 Pillars (Nebula, Solar, Stardust, Vortex). After the final pillar is destroyed, the words "Impending doom approaches..." appear at the bottom left of the screen. The screen will then begin to vibrate periodically with fading vision. All sound effects are also dimmed. After a while, a white flash will appear, unveiling the Moon Lord. All backgrounds are instantly reduced to blackness and the sun will disappear, effectively making it permanent night until the fight ends. Note that it will not leave until you win or die. Defeating the Moon Lord rewards you with the Champion of Terraria Achievement, and drops a random weapon from the relevant pool, plus some Luminite Ore, used for endgame items and armor. This is the hardest boss in Terraria.

Attack Pattern
The boss has 3 sections (2 hands and the head) that must be killed by attacking the eyes in the centre 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 Phantasm beam 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) in the form of white particles that travel along the tongue. The particles are destructible and if a particle successfully reaches the Moon Lord, one of its body parts will regain 1,000hp. The Moon Lord will drain 3 particles before stopping. 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.

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 UFO mount from a Cosmic Car Key or Shrimpy Truffle before the boss fight, it can make the fight much easier due to the unlimited flight it provides.

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)

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 (it is quite unlikely that the Solar Pillar will drop less than 18 Solar Fragments). 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.

(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.)

Fight, Warp, Nurse, Repeat.
First you need to make sure your Nurse is near your spawnpoint. Then you do everything normally but when fighting the Moon Lord you need to keep him away from Spawn and only Teleport back if you can't use a potion and need to badly (For example, having 100 health and no potions.) and no matter how FAR you are Moon Lord NEVER despawns (Unless you die... Clearly) 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.

Trivia

 * This boss bares resemblance to Cthulhu, the deity created by H. P. Lovecraft
 * The top of the Moon Lord's head appears to contain an alternately colored Brain of Cthulhu Similarly colored to the ocram boss in the console and mobile version.
 * It was confirmed by Cenx, that the Moon Lord is Cthulhu's brother.