The Part Where He Kills You walkthrough

Quick answer: Work through Wheatley’s last test chambers, reach his chamber, bounce his bombs back at him and attach the three corrupted cores. Finish by shooting a portal at the moon.
Show walkthrough (story spoilers)
How to start
This is Chapter 9, the last chapter of the single-player story. Wheatley now controls Aperture and wants you dead. GLaDOS, stuck in a potato battery, rides along on your portal gun.
Wheatley’s last chambers
Wheatley puts you through a few more test chambers, which he built badly by mashing old ones together. The last ones are Mash-up, Holmes vs. Moriarty and Morton’s Fork. Watch for his trap at the end and keep moving.
Reach Wheatley’s chamber
Portal down from the ledge, cross the catwalk past the corrupted cores and climb the stairs. Plug GLaDOS into the receptacle on the left and ride up to the top. The fight starts as soon as you arrive.
Beat Wheatley
Wheatley throws bombs at you. Turn his bombs back on him with portals and attach the three corrupted cores to his body. How to beat Wheatley.
The Stalemate Resolution Annex
After the third core, the Stalemate Resolution Annex opens. Use portals to get inside and start the core transfer. Wheatley has one last trick, and the building starts to fall apart.
The final move
When the roof breaks open, you need one last portal. How to shoot the moon.
Ending
Watch the ending cutscene and stay for the song in the credits, Want You Gone. Finishing the chapter unlocks the Lunacy Steam achievement.
