The Eye was created by Agamotto, using an Infinity Stone with the power of Time as a component. The Eye remained in Kamar-Taj where it is discovered by Doctor Stephen Strange. After reading one of the passages of the Book of Cagliostro about the Eye, he put on the pendant and tested its power on an apple, forwarding and reversing time on the object. He then uses the Eye's power on the book, discovering and reading the stolen passages about the Dark Dimension and Dormammu.
He later uses the Eye to rewind time in Hong Kong, to restore its Sanctum and the surrounding area until he is stopped by Kaecilius, causing all of time to stop before the Sanctum could be fully restored, thus allowing the Dark Dimension through. Doctor Strange flies into the Dark Dimension and activates another power of the Eye. When he confronts Dormammu to parley, Dormammu kills him, but the Eye's power reverses the moment back to its start every time he is killed, trapping them both in an endless time loop. Dormammu finally relents and accepts Doctor Strange's terms in return for breaking the loop, withdrawing his attack on Earth and taking his Zealots. Doctor Strange returns the Eye to its place in Kamar-Taj until he is ready to wield it.
During Thanos' quest to retrieve all six Infinity Stones, Ebony Maw and Cull Obsidian were sent to bring the Time Stone in the Eye to Thanos. Doctor Strange refused to surrender it as it was his oath to protect the stone with his life. After being captured by Ebony Maw, Iron Man and Spider-Man snuck on board Maw's ship and killed him and saved Strange in the process. Strange still refused to surrender the stone fearing Thanos would end up using it, but because the ship was on its coarse to Titan, the planet of Thanos' origins, Iron Man convinced Strange to take the fight to Thanos. After meeting the Guardians of the Galaxy on Titan, Doctor Strange used the Eye to look forward in time to see all the possible outcome fight against Thanos, and saw only one out of fourteen million where it ends with the Avengers' victory. Thanos fought Strange and managed to overpower him, taking the Eye from Strange and crushed it, only to find out the Time Stone wasn't in it. Iron Man fought Thanos and was stabbed by him, but Strange gave up the Time Stone to Thanos on the promise to spare Iron Man's life. Upon retrieving the Time Stone, Thanos traveled to Wakanda on Earth and used it to reverse Vision's destruction caused by Scarlet Witch in order to retrieve the Mind Stone from him.
Five years after Thanos's victory, the Avengers decided to travel back in time to retrieve the Infinity Stones in order to undo Thanos's snap after Scott Lang discovered the use of time travel during his time in the Quantum Realm. While brainstorming the locations of the Infinity Stones throughout time, Black Widow informed the team that the Mind, Space and Time Stones were all in New York City in 2012.
With that in mind, Iron Man, Captain America, Hulk, and Ant-Man traveled back in time to New York when Loki and the Chitauri invaded Earth in 2012. While Iron Man, Captain America, and Ant-Man went to retrieve the Mind and Space Stones, Hulk went to the New York Sanctum and found the Ancient One wearing the Eye of Agamotto, which contained the Time Stone. When Hulk attempted to take the Time Stone from the Ancient One, she forced him out of his body and into his astral form so they could talk civilly. After the Hulk explained the mission to the Ancient One, she refused to give him the Time Stone where she revealed that taking the Infinity Stones from the past would create alternate timelines. While Hulk assured that the Time Stone would be returned before its absence caused any damage to the timeline, the Ancient One still refused, citing that if he died or did not return the Time Stone, then the new timeline would be left defenseless against its own version of Thanos and any other threats as the Masters of the Mystic Arts took an oath to protect the Time Stone. However, when Hulk revealed Dr. Strange had given up the stone willingly, the Ancient One realized her future successor had a reason for giving the stone up so she decided to trust Strange and gave the Time Stone to the Hulk.
After the Avengers returned back to the present, they created their own gauntlet and used the Time Stone, along with the other stones to restore everyone who was killed by Thanos's snap. After everyone's resurrections and defeating an alternate Thanos and his armies, Captain America traveled back in time to return the Infinity Stones to the moments they were taken where he returned the Time Stone back to the Ancient One.
Despite being destroyed in Avengers: Endgame, the Eye is seen with Strange after it was reconstructed. However, it no longer contains the Time Stone, which was destroyed by Thanos.