It's actually a pretty straight line.
In 1948, Sayyid Qutb moved to Greeley, Colorado where he determined that while there were problems with the way Egyptian society was interpreting the Koran, it was nothing compared to the decadence of the West. He came back to Egypt in 1950, joined the Muslim Brotherhood and helped them throw their weight behind Gamal Nasser to overthrow the pro-western Government. Things went worse than expected:
Nasser had secretly set up an organisation that would sufficiently oppose the Muslim Brotherhood once he came to power. This organisation was called "Tahreer" ("freedom" in Arabic). It was well known that the Brotherhood were made popular by their extensive social programs in Egypt, and Nasser wanted to be ready once he had taken over. At this time, Qutb did not realize Nasser's alternate plans, and would continue to meet with him, sometimes for 12 hours a day, to discuss a post monarchical Egypt. Once Qutb realized that Nasser had taken advantage of the secrecy between the Free Officers and the Brotherhood, he promptly quit. Nasser then tried to persuade Qutb by offering him any position he wanted in Egypt except its Kingship, saying: "We will give you whatever position you want in the government, whether it's the Ministry of Education, Ministry of Arts, etc."
Qutb refused every offer, having understood the reality of Nasser's plans. Upset that Nasser would not enforce a government based on Islamic ideology, Qutb and other Brotherhood members plotted to assassinate him in 1954. The attempt was foiled and Qutb was jailed soon afterwards; the Egyptian government used the incident to justify a crackdown on various members of the Muslim Brotherhood for their vocal opposition towards the Nasser administration.
Qutb, the spiritual leader of the Muslim Brotherhood, was in jail from 1952 to 1964. In 1964 he published Milestones, which is basically "how to overthrow the Decadent West to return the world to a muslim paradise. Also in 1964, an impressionable young Egyptian named Ayman al-Zawahiri decided that overthrowing the Decadent West was the way to go because then he'd never have to learn to talk to girls (really). Unfortunately for the future of world peace, Qutb was executed by Nasser in a show trial and the formerly pretty-mainstream Muslim Brotherhood started splintering into hard-core factions, one of which included Ayman Al Zawahiri.
Zawahiri, a surgeon, traveled a bunch. One of the places he went was Jeddah. One of the people he met there was Osama bin Laden. They became bros. It took about a year for Zawahiri to become bin Laden's guru. By 2001 Egyptian Islamic Jihad and al Qaeda had merged.
This is basically the first half of Lawrence O'Donnell's The Looming Tower but he really adds flavor and detail, not nuance. It really is that simple: Nasser betrays the Muslim Brotherhood, Zawahiri radicalizes, it spreads to bin Laden, towers come down.