Zekrom, while still sealed inside the Dark Stone, was given to Lewis by Lenora, who believed that he was a descendant of the Hero of Ideals that was destined to battle N.
In A Fiery Descent!, Lewis attempted to release Zekrom from the Light Stone in order to fight N's Reshiram, but Zekrom did not appear, as it had not yet deemed Lewis worthy.
In Storming the Castle!, Zekrom was finally released from the Dark Stone after hearing Lewis' speech about how people and Pokémon should live in harmony. Recognising Lewis as the Hero of Ideals, Zekrom agreed to battle Reshiram with Lewis.
Zekrom and Reshiram battled furiously in the skies above N's Castle. While Reshiram quickly gained the upper hand, Lewis' words of encouragement to Zekrom allowed it to launch a counterattack, eventually defeating Reshiram with a powerful Fusion Bolt.
After the battle, N realised the error in his views of the world and decided to leave with Reshiram to learn about Trainers. Zekrom decided to accompany N, in order to assist him with his new ideals.
Zekrom returned along with N and Reshiram in A Fusion for the Future!, where it helped to rescue Lewis from being frozen by Kyurem. Zekrom was forced to be sealed in the Dark Stone once more after being hit by Kyurem's Absofusion, giving Kyurem the ability to transform into Black Kyurem. After being reminded of its bond with Lewis, Zekrom was released from Kyurem and teamed up with Reshiram to defeat the Boundary Pokémon. After Ghetsis was arrested and Kyurem returned to Giant Chasm, Zekrom said farewell to Lewis once again and left with N and Reshiram.
Zekrom can be a slightly picky Pokémon, initially not recognising Lewis as the Hero of Ideals and refusing to leave the Dark Stone when Lewis initially summoned it. However, upon hearing Lewis' ideals, Zekrom fully recognised Lewis as the Hero and fought loyally by his side.