In the spring of 1922, Howard Roark is expelled from his architecture school for refusing to adhere to the school's conventionalism. Despite an effort by some professors to defend Roark and a subsequent offer to continue, Roark chooses to leave the school. He believes buildings should be sculpted to fit their location, material and purpose elegantly and efficiently, while his critics insist that adherence to historical convention is essential. He goes to New York City to work for Henry Cameron, a disgraced architect whom Roark admires. Peter Keating, a popular but vacuous fellow student, has graduated with high honors. He too moves to New York to take a job at the prestigious architectural firm of Francon & Heyer, where he ingratiates himself with senior partner Guy Francon. Roark and Cameron create inspired work, but rarely receive recognition, whereas Keating's ability to flatter brings him quick success. To hasten his rise to power, Keating bends his skills in manipulation towards the removal of rivals within his firm. His actions culminate in the unintended manslaughter of Lucius Heyer, a senior partner, who dies of a stroke when threatened with blackmail by Keating. Though he occasionally feels guilt for his unethical actions that lead to his partnership within the firm, Keating demonstrates that he will always pursue his lust for prestige regardless of personal cost.
After Cameron retires, Keating hires Roark, who is soon fired for insubordination by Francon. Roark works briefly at another firm and then opens his own office. However, he has trouble finding clients and eventually closes it down. He takes a job at a granite quarry owned by Francon. Meanwhile, Keating has developed an interest in Francon's beautiful, temperamental and idealistic daughter Dominique, who works as a columnist for The New York Banner, a yellow press-style newspaper. While Roark is working in the quarry, he meets Dominique, who has retreated to her family's estate in the same town. There is an immediate attraction between them. Rather than indulge in traditional flirtation, the two engage in a battle of wills that culminates in a rough sexual encounter that Dominique later describes as a rape. Shortly after their encounter, Roark is notified that a client is ready to start a new building, and he returns to New York before Dominique can learn his name.
Ellsworth M. Toohey, author of a popular architecture column in the Banner, is an outspoken socialist who is covertly rising to power by shaping public opinion through his column and his circle of influential associates. Toohey sets out to destroy Roark through a smear campaign he spearheads. Toohey convinces a weak-minded businessman to hire Roark to design a temple dedicated to the human spirit. Given full freedom to design it as he sees fit, Roark includes a nude statue of Dominique, which creates a public outcry. Toohey manipulates the client into suing Roark. At the trial, prominent architects (including Keating) testify that Roark's style is unorthodox and illegitimate. Dominique speaks in Roark's defense, but he loses the case.
Dominique decides that since she cannot have the world she wants, in which men like Roark are recognized for their greatness, she will live completely and entirely in the world she has, which shuns Roark and praises Keating. She offers Keating her hand in marriage. Keating accepts, breaking his previous engagement with Toohey's niece Catherine. Dominique turns her entire spirit over to Keating, doing and saying whatever he wants. She fights Roark and persuades his potential clients to hire Keating instead. Despite this, Roark continues to attract a small but steady stream of clients who see the value in his work.
To win Keating a prestigious commission offered by Gail Wynand, the owner and editor-in-chief of the Banner, Dominique agrees to sleep with Wynand. Wynand then buys Keating's silence and his divorce from Dominique, after which Wynand and Dominique are married. Wynand subsequently discovers that every building he likes was designed by Roark, so he enlists Roark to build a home for himself and Dominique. The home is built, and Roark and Wynand become close friends, although Wynand does not know about Roark's past relationship with Dominique.
Now washed up and out of the public eye, Keating realizes he is a failure. He pleads with Toohey for his influence to get the commission for the much-sought-after Cortlandt housing project. Keating knows his most successful projects were aided by Roark, so he asks for Roark's help in designing Cortlandt. Roark agrees to design it in exchange for complete anonymity and Keating's promise that it will be built exactly as designed. When Roark returns from a long trip with Wynand, he finds that the Cortlandt design has been changed despite his agreement with Keating. Roark dynamites the building to prevent the subversion of his vision.
The entire country condemns Roark, but Wynand finally finds the courage to follow his convictions and orders his newspapers to defend him. The Banner's circulation drops and the workers go on strike, but Wynand keeps printing with Dominique's help. Wynand is eventually faced with the choice of closing the paper or reversing his stance. He gives in; the newspaper publishes a denunciation of Roark over Wynand's signature. At the trial, Roark seems doomed, but he rouses the courtroom with a speech about the value of ego and the need to remain true to oneself. The jury finds him not guilty and Roark wins Dominique. Wynand, who has finally grasped the nature of the "power" he thought he held, shuts down the Banner and asks Roark to design one last building for him, a skyscraper that will testify to the supremacy of man. Eighteen months later, the Wynand Building is under construction and Dominique, now Roark's wife, enters the site to meet him atop its steel framework.