Chest of Harmony

The Tree of Harmony chest is first seen in Princess Twilight Sparkle - Part 2 after emerging from the Tree of Harmony. The chest requires six keys to open.

Princess Twilight Sparkle - Part 2
When the Tree of Harmony regains its magic, a flower sprouts at its roots. The flower blooms to reveal a chest with six locks. Princess Celestia discloses that she does not know where the keys are but assures Twilight Sparkle "...it is a mystery you will not be solving on your own".

Castle Mane-ia
The chest is briefly mentioned in the beginning of the episode. According to Twilight, no information on the chest and its contents exists in Ponyville.

Twilight Time
A blueprint of the chest hangs on a wall in the Golden Oak Library.

Maud Pie
The same blueprints as in Twilight Time are seen again in Maud Pie.

Twilight's Kingdom - Part 1
With the looming threat of Lord Tirek, and at the prompting of Discord, Twilight Sparkle redoubles her efforts to find the keys to the Chest. However, she is unable to find any clue in the library of the Castle of the Royal Pony Sisters. Once again following a clue from Discord, Twilight decides to check the journal in which she and her friends are recording their lessons in the magic of friendship. Discord has bookmarked five events that included fundamental tests of her friends Element virtues and led them to teach these virtues to other ponies.

The Mane Six bring the five gifts they received as a result of these adventures. When Pinkie Pie accidentally knocks Boneless against the mysterious Chest, the toy transforms into a key. All the other gifts do the same.

Twilight's Kingdom - Part 2
With Tirek threatening her friends if she does not surrender, Twilight Sparkle chooses to give up her magic rather than see them harmed. Much to Tirek's surprise, she includes Discord in her bargain despite his having betrayed them all. A chastened Discord gives Twilight a medallion that Tirek had given him as a false sign of friendship, telling Twilight that it is a sign of his genuine friendship.

Seeing the rainbow shimmer on the medallion, the friends realize that this is the last of the keys. They rush to the Tree of Harmony where it transforms into the sixth key. The friends turn their keys simultaneously and the chest opens, releasing a rainbow-like blast of power that transforms them, giving them new magic and rainbow-marked coats, manes and tails.

Tirek arrives but even with the power of every pony in Equestria behind him, he is unable to penetrate the combined shield of the six empowered friends. A blast of rainbow light strips him of his stolen power and returns him to Tartarus. The friends then unleash a rainboom-like wave of power that restores the magic to all the ponies of Equestria.

After Tirek's defeat, a large rainbow from the Tree of Harmony carries the chest and its keys to Ponyville, where it sinks into the ground and the grand Friendship Rainbow Kingdom castle rises from where it came to rest.

Keys
Following the time of the chest's discovery, Twilight and her friends each come into possession of objects of assorted value. The ponies acquire these objects after facing situations that challenge them to live up to their respective Elements of Harmony and, upon embracing their element, inspire others to do the same. Prior to the acquisition of these items, each pony has a moment of clarity relating to her element that manifests as a rainbow-colored glow in her eyes. The items themselves emit the same glow soon after the ponies receive them. In Twilight's Kingdom - Part 1 and Part 2, the objects manifest as the keys shaped like the Mane Six's cutie marks needed to open the chest once they come into contact with it.

Rarity – generosity
In Rarity Takes Manehattan, Rarity nearly abandons her generous spirit when Suri Polomare takes advantage of her generosity in an attempt to win at Manehattan's Fashion Week. She soon regrets her behavior and is forgiven by her friends, inspiring Suri's assistant Coco Pommel to quit her job and seek out a better life in the big city. As a sign of her gratitude, Coco gives Rarity a spool of rainbow-colored thread.

The spool becomes a key with a head shaped like three overlapping diamond shapes, an angular stem, and a square bit.

Rainbow Dash – loyalty
In Rainbow Falls, Rainbow Dash is torn between flying with her friends and the Wonderbolts at the Equestria Games. After her friends demonstrate their loyalty to her, and learning of Spitfire and Fleetfoot's efforts to replace their teammate Soarin with her, Rainbow chooses Ponyville over her heroes. Soarin is accepted back on his team, and Spitfire gives Rainbow Dash a golden Wonderbolts pin as a token of her appreciation.

The pin becomes a key with a cloud-shaped head and a lightning bolt-shaped stem with a jagged bit at the tip.

Pinkie Pie – laughter
In Pinkie Pride, Pinkie Pie feels challenged by fellow party planner Cheese Sandwich, and allows her pride to get in the way of planning Rainbow Dash's birth-iversary party. The two rivals make amends when Cheese tells Pinkie how one of her parties motivated him to become a party planner as a colt. He later gives her his rubber chicken companion Boneless as a memento of his visit.

Boneless becomes a key and its head is shaped like three balloons, and has a curved stem.

Fluttershy – kindness
In It Ain't Easy Being Breezies, Fluttershy pampers a swarm of Breezies to the point of almost jeopardizing their home migration. Recognizing the dangers the Breezies face in Ponyville, she reluctantly evicts them from her home while teaching the loudmouthed and rude Seabreeze to be kinder to his fellow Breezies. Fluttershy helps the Breezies return home, and Seabreeze gives her a flower with blue petals to remember them by.

The flower becomes a key shaped like a butterfly with a pointed tip and loop at the end of its stem.

Applejack – honesty
In Leap of Faith, Applejack becomes entangled in Flim and Flam's scheme to sell a worthless "cure all" tonic along with their accomplice, Silver Shill. She realizes the harm her dishonesty is causing when Granny Smith's blind faith in the tonic leads to reckless behavior, and confesses to having misled the ponies of Ponyville. In response, Shill also denounces the brothers and gives Applejack the single bit he earned while working for them.

The bit becomes a key shaped like an apple with an elongated stem and a leaf at the tip.

Twilight Sparkle – magic
In Twilight's Kingdom - Part 1, Twilight Sparkle's attempt to find her key is stymied by the fact that she had never faced a situation testing her magic. In Part 2, Lord Tirek forces Twilight to bargain for her friends' safety in exchange for her and the Princesses' Alicorn magic. Twilight accepts and includes Discord in this bargain, despite Discord's earlier betrayal. Penitent and broken, Discord gives Twilight a medallion that originally belonged to Tirek's brother Scorpan, which Tirek had given him in false friendship.

The medallion becomes a key shaped like a six-pointed star, with one of its points elongated to serve as the stem; the bit at the end is shaped like half of the star.