At the outset of Ayn Rand's The Fountainhead, Howard Roark and Peter Keating depart from the Stanton Institute of Technology in very different ways. Howard Roark is expelled for his refusal to complete exercises in classical design. He goes to New York to seek a position with the recently eminent but now reviled modernist designer Henry Cameron. Peter Stanton is the valedictorian of his class, and he turns down a scholarship to the Ecole des Beaux Arts in Paris to take up a lucrative position with Guy Francon, the darling of the design world. Peter Keating immediately takes to the competitive and underhanded world that architecture has become. He works his way up through the ranks, becoming ever closer to Guy Francon. Howard Roark's friendship with Henry Cameron develops quickly, but Cameron's firm is slowly crumbling.
A new architecture critic, Ellsworth Toohey, publishes a book praising Guy Francon and damning Henry Cameron. Peter Keating becomes engaged to Toohey's niece, though he has not yet met Toohey, and he convinces Howard Roark to work for Guy Francon.
While Howard Roark works in the office, Peter Keating, who is now the chief designer, often comes to him secretly for help. But one day when Peter Keating is out of the office, Howard Roark turns down Guy Francon's request to design a building like one of Henry Cameron's, and Francon fires him. He manages to get a job designing in the modernist style for John Erik Snyte, but the building industry has been halted by a strike, which is supported by eminent figures such as Austen Heller and Ellsworth Toohey. When the strike ends, Heller asks Snyte to design a home for him. Roark spontaneously sketches his own original design over the proposal, and Heller hires him to design his home. Roark opens his own firm.
Meanwhile, Peter Keating meets Dominique Francon, Guy Francon's daughter, and becomes deeply attracted to her. Though he is still nominally engaged to Catherine, he begins pursuing Dominique. For a while it seems that Roark will succeed, but he makes many people very angry, and his designs face various unrelated obstacles. Eventually he fails and then goes to work in a granite quarry until he can afford to start again.
At the quarry, Roark meets Dominique Francon, who has no idea he is anything more than a quarry-man. She is incredibly attracted to him, but she despises herself for it and finds ways, she thinks, to torture him. One night he comes to her home and rapes her, presuming that this is something she would want. A week later, just before Dominique gives in and comes back to the quarry, he is summoned back to New York to build the Enright House. Meanwhile, Ellsworth Toohey writes a rave review of Peter Keating in his column for the Banner. They become friends.
When Enright House is finished, Dominique sees it and thinks it is so beautiful it should be blown up. She discovers Roark's identity at a party they both attend, and at that point they begin a passionate affair. Dominique puts all of her energy into taking away Roark's commissions and getting them for Keating because she does not believe these people deserve to have a building designed by Howard Roark. Roark does get a few buildings, and one of them, a temple for World Religions, is actually secured secretly by Toohey.
After the Temple is built, Toohey writes that its existence degrades religion, and the owner, Stoddard, sues Roark. He loses the lawsuit, and Dominique's testimony for the prosecution is so strange, so weirdly supportive of Roark, that she winds up being fired from the Banner. To punish herself, Dominique proposes immediate marriage to Peter Keating, who agrees, despite the fact that he was finally supposed to marry Catherine Halsey the next morning. Their marriage is hollow and cold. Dominique is completely unresponsive in bed, and Keating disguises his unhappiness. Toohey's friendship has become the dominant force in his life. Toohey convinces them that Dominique should try to persuade Gail Wynand to let Peter Keating design Stoneridge, a very important project.
The narrative switches perspective and introduces this new character, Gail Wynand, owner of the Wynand newspapers, including the Banner. Gail Wynand thinks about shooting himself, but he finally realizes he needs a better reason to end his life than boredom. He opens a package that Toohey sent him, in which he finds the statue of Dominique that was to have stood in the Stoddard Temple. He immediately agrees to see Keating's wife in order to find out who the sculptor is. Upon meeting Dominique, he agrees to give her husband Stoneridge in return for her going with him on a cruise.
On the cruise he proposes marriage, and she agrees to leave Keating for him. Gail Wynand buys off Peter Keating. On Dominique's way to Reno to get a divorce, she stops to see Roark. He comforts her and tells her that she should keep going until she is ready to be with him. Meanwhile, back in New York, Ellsworth Toohey has complete control over the intellectual scene, and all the people he chooses to support appear to be talentless, lazy, and undeserving. He begins to abandon Peter Keating, especially when he learns of Dominique's remarriage.
Dominique insists on a society wedding, and Wynand agrees, but he tells Alvah Scarret, the editor of the Banner, that the Banner is never allowed to cover his wife. Wynand is passionately in love with Dominique, and he hates it when she leaves the apartment. Dominique rubs the degradation of the Wynand papers in his face.
Howard Roark is slowly regaining his career. Now he is designing a new kind of summer home, but just as he finishes, he gets a message that he is to see Wynand. Wynand wants Roark to design a house in the country for him and his wife, and he tries to crush Roark like he does other men with integrity, but he fails completely. The two men become great friends, and though Dominique finds this situation extremely painful, she must endure it.
Peter Keating has gone out of fashion, and his firm is failing. He gets Roark to agree to secretly design a plan for a new housing project called Cortlandt Homes, which Peter Keating will pass off as his design. Roark goes off on a cruise with Gail Wynand. When he returns he discovers that his plans for Cortlandt have not been completely followed. With Dominique's help, he blows up the building. Toohey forces Keating to reveal who actually designed the building, and Roark is brought up on charges. Meanwhile, Toohey's influence has begun to extend over some of the richest men in the world. He is clearly preparing for something, and he now preaches a doctrine of "universal altruism," insisting that no man is better or more worthy than any other.
When Toohey finally writes a column attempting to destroy Roark once and for all, Wynand fires him. But almost the entire newspaper staff walks out on strike, for most of them were hand-picked by Toohey. As Wynand struggles to keep the paper going, Dominique comes in to help him, and they are happier together than they have ever been. Finally Wynand realizes he must back down or lose the paper, so he backs down. Dominique immediately leaves him and publicly joins Roark, explaining that she is ready to face the world with him.
At the trial, very many witnesses explain why Roark should be condemned. They focus on the fact that Roark destroyed a housing project for poor people just because he did not like what had happened to his design. Roark stands and gives a speech, explaining why the creator is more important than other people and why a creator must be respected. He talks about the evils of the collectivism that has swept across the country. He also talks about America and how America is great because it exists so that every individual can pursue his or her personal happiness--a selfish goal, but selfishness properly understood.
After Roark rests, everyone leaves the courtroom expecting a long deliberation. But the jury almost immediately returns. The jurors announce that Roark is not guilty.
On Toohey's first day back at the Banner, Wynand closes it forever. Though he is devastated by the loss of Dominique, he hires Roark to build the Gail Wynand building, which he wants to be the biggest and best building in New York. The only condition is that they will never communicate directly again. Roark sadly agrees. The book ends with the Wynand building slowly rising into the sky.