Harry did this in an attempt to cure his hereditary illness, but his physiology is instead horribly mutated, and he then steals an OsCorp battle suit and glider to exact vengeance on Peter.
Although Green Goblin is ultimately defeated and incarcerated in the Ravencroft Institute, their battle resulted in Gwen Stacy’s death.
In case you need a refresher on The Amazing Spider-Man 2, Harry Osborn turned into the Green Goblin when he injected himself with one of the venom samples from OsCorp’s genetically-altered spiders, the same kind that gave Peter Parker his special abilities.