Cortana's beginning was like no other, she was created from living tissue, the cloned brain of Dr. Halsey. While ordinarily AI constructs were made from deceased individuals, Dr. Halsey cloned her brain twice successfully. Her first clone was used for the creation of Kalmiya while the second was later used to create Cortana. Because Cortana was made from living tissue, she shares some of her creator's memories, thoughts, opinions and values while sharing her creator's physical form.
They Let Me Pick
Cortana was created to assist Halsey's new SPARTAN-IIs with not only hacking alien technology but also as a way to plan ahead on the field. Dr. Halsey allowed Cortana to pick whichever SPARTAN she wanted, ultimately choosing John-117; the reasons she later gave for this was John's luck. At first, the SPARTAN was a little hesitant about his new companion, but Cortana quickly proved herself by her quick reaction and helping him manoeuvre a highly-dangerous, rigged by James Ackerson, obstacle course. While testing out the UNSC Pillar of Autumn's systems, she wreaked havoc in Ackerson's private files, hacking into his personal computer and sending a note requesting reassignment to front line service, sending a large amount of money from his account to a brothel and then sending the bill to his home, where his wife would find it.
I Think We Both Know The Answer To That
On this 'Halo', John-117 carrying Cortana entered Halo's Control Room. Here she entered Halo's system and started to extract any and all information she could find about it, finding out the truth of Halo, while John sought for the captain of the Autumn. Later, when Halo's Monitor persuaded John-117 to activate Halo, Cortana stopped him by explaining that Halo was a super-weapon. By this simple action, she saved all sentient life in the galaxy. She later detonated the Autumn's engines to destroy the ring, fleeing the soon-to-be-destroyed ring in a Longsword.
I Like Crazy.
Spotting a Pelican dropship with a number of Halo-survivors, she guided them towards the nearby Covenant flagship Ascendant Justice. Here, John together with the Marines quickly took over the ship and, putting Cortana in charge of navigation and steering, she improved upon the ship's weapons and Slipspace capabilities. Using this ship, she flew to Reach and rescued survivors from the Battle of Reach. Here Cortana came in contact with a Covenant AI, who managed to send Earth's coordinates to the Prophet of Regret.
Returning to Earth, Regret's fleet attacked the city of New Mombasa. After retaliation of Earth's attack force, Regret entered slipspace above the city, dealing massive damage, and leading the UNSC In Amber Clad to another Halo ring. Here, John-117 hunte down and killed the Prophet of Regret, after which John and Thel 'Vadam were taken by a Flood Gravemind who were sent to stop the Halo Array from firing. John, together with Cortana, was sent to High Charity and remained there so she could remotely ignite In Amber Clad's engines and destroy the Halo Array. While John successfully boarded High Charity's Dreadnought and escaped, leaving Cortana in the clutches of the true enemy, Gravemind, who had by then overrun High Charity.
Don't Make a Girl a Promise
Being captured and tortured by the Gravemind, Cortana is slowly losing her functions while doing her best to keep all her vital information hidden. However, Cortana is able to send a message to Earth by stashing it on a Earth-bound Flood-infected ship. In this message, she proclaimed to know a way to stop the Flood, without firing all the Halo Arrays, entering a Portal towards The Ark. Lord Hood doubted this, as he was not convinced this was not a Flood-trap. It turned out that he was correct, the Gravemind forced Cortana to sent the message, to get all his enemies in one place. Cortana was in great danger, her defenses were at an end. Cortana had been making copies of herself to distract the Gravemind, but this no longer worked. Just when Cortana had finally given up, she was rescued by John-117. Shortly after her rescue, Cortana ignited Installation 04's replacement to destroy the Ark and escaping it onboard the UNSC Forward Unto Dawn. However, due to the unstable portal, the Dawn was split in two which resulted in John and Cortana to be adrift in space.
Wake Up John...
During her time on board the ship, she started to show her first signs of rampancy. Four years, seven months, and ten days after the UNSC Forward Unto Dawn was split into two, an increasingly lonely Cortana woke John-117 from cryonic stasis. It turned out that the Dawn was floating towards a Forerunner planet and they crashed unto its surface. After the crash landing, John had noticed some disturbance with Cortana and was asking her about it. Reluctant at first, Cortana later admitted that she had surpassed an AI's seven-year lifespan; after John's suggestion of Halsey, she agreed Halsey may be the key to a longer life for Cortana.
After contact with some Covenant forces Cortana intercepted signals from the UNSC Infinity who had located the Dawn's emergency signal. In order to send a clear signal back, she unwittingly freed the Forerunner Didact. After John-117 came for a final confrontation with the Didact on a light bridge, Cortana manifested herself in the bridge helping John defeat the Didact.
We Were Supposed To Take Care Of Each Other…And We Did!
This manifestation of Cortana turned out to be her penultimate one. After the Didact was defeated, she showed herself life-size and told John that she was not coming with him. The blast that had destroyed the Didact's weapon had destroyed most of her too, and she only had the power to talk to him for a short while. Due to Cortana's efforts, John-117 survived and was eventually rescued, though he was left emotionally fractured by her death.