He was one of the leading scientists behind the creation of the Genesis Device. Marcus expressed misgivings in dealing with Starfleet, knowing that Genesis had could be used as a terrible weapon. When Khan Noonien Singh had the USS Reliant come to Regula to take the Project Genesis device and related materials, Marcus and the other Genesis Project team members did not know that Khan had hijacked Reliant. David Marcus believed that Starfleet was going to co-opt Genesis for military use; however, his mother did not share that view.
When Admiral James T. Kirk arrived in the Genesis Cave, Marcus attacked Kirk, believing Kirk to be responsible for the murder of the scientists who remained behind on the Regula station. Captain Clark Terrell and Commander Pavel Chekov - under the control of Khan via Ceti Eels - used the distraction to pull weapons on the Enterprise crew members. They provided the coordinates of the Genesis torpedo to Khan. David Marcus tried to rush Terrell, and Lieutenant Saavik tackled him before Terrell could vaporize him with a phaser. Terrell and Chekov were unable to bring themselves to kill Admiral Kirk. Terrell committed suicide, the eel left Chekov's body and he later recovered.
During the final battle between the Enterprise and Reliant, Marcus went to the bridge. When an overloaded helm console severely injured Hikaru Sulu, Marcus performed CPR on Sulu until medics could arrive on the bridge, saving Sulu's life. When a defeated Khan activated the Genesis Device, Marcus recognized the Genesis wave emanating from the Reliant. Marcus told Kirk that they had four minutes before the device exploded, and that once started it could not be stopped. (TOS novel: Star Trek II: The Wrath of Khan)
A short time later David Marcus and Saavik transferred to the USS Grissom, which was heading back to the Genesis Planet to conduct a science survey. During this time the two had a relationship. Arriving at the planet, the two discovered an animal life form on the planet which should not have been there. The two beamed down to Genesis to investigate, and discovered the regenerated body of Captain Spock. Right after discovering Spock on the surface of Genesis, the Grissom was destroyed by a Klingon bird of prey under the command of Kruge, who was attempting to steal the secrets of the Genesis Device. Seeing that both Spock and the planet were rapidly aging, Marcus admitted to Saavik that he had used protomatter to create Genesis.
Marcus, Saavik, and Spock were taken prisoner by the Klingons, and Marcus was killed at Kruge's order. (TOS movie: Star Trek III: The Search for Spock) David's death deeply affected his father, and caused him to harbor great distrust and anger toward the Klingons for years to follow. (TOS movie: Star Trek VI: The Undiscovered Country)
In one alternate timeline, David Samuel Kirk was born to a married Carol and James Kirk. He was killed at age three, along with his mother, when their transport vessel, the Galileo, was attacked by a Vulcan ship. (Star Trek: Myriad Universes novel: A Less Perfect Union)
In yet another alternate timeline where Spock died in childhood, David and Saavik were investigating the newly formed Genesis Planet when they were taken prisoner by Kruge. Having heard about the power of the Genesis Device, Kruge and his crew tortured David for information going so far as to severe his left hand. Nevertheless, David refused to divulge any information, and, with Saavik's help, was able to bury any knowledge of Genesis from being detected by a mind-sifting device.
David and Saavik were eventually taken to Praxis for period of about one month before Kruge rendez-vous'd with Kirk and the recently stolen USS Enterprise to exchange the two prisoners for information on Genesis. Although David survived, Kirk died in while trying to save the Enterprise from a warp core breach.
Later, when war broke out with the Klingon Empire over the Federation's refusal to share the technology of the Genesis Device, David worked as a social worker, recording the names of Federation refugees arriving on Vulcan. David and Saavik were romantically involved at this time, but saw little of each other as Saavik was acting as the Federation ambassador to the Romulan Star Empire and thus spent most of her time on Romulus.
As the war dragged on to a stalemate, David was asked by the Federation President to be involved in discussions on the use of the Genesis Device on the Klingon moon of Praxis. Known as Operation Olympius, David refused and would have no part in it.
Following the Federation's attack on Praxis and the empire's subsequent surrender, David briefly worked on Qo'noS as part of the Federation's medical relief effort before deciding to join Saavik on Romulus. (Star Trek: Myriad Universes novel: The Chimes at Midnight)