In early 1922, Howard Roark is expelled from the architecture department of the Stanton Institute of Technology because he will not adhere to the school's preference for historical convention in building design. Roark goes to New York City and gets a job with Henry Cameron. Cameron was once a renowned architect, but now gets few commissions. In the meantime, Roark's popular, but vacuous, fellow student (and housemate, as Roark boards in the home of Keating and his mother) Peter Keating (whom Roark sometimes helped with projects) graduates with high honors. He too moves to New York, where he has been offered a position with the prestigious architecture firm, Francon & Heyer. Keating ingratiates himself with Guy Francon and works to remove rivals among his coworkers. After the Francon’s partner Heyer suffers a fatal stroke brought on by Keating's antagonism, Francon chooses Keating to replace him. Meanwhile, Roark and Cameron create inspired work, but struggle financially.
After Cameron retires, Keating hires Roark, whom Francon soon fires for refusing to design a building in the classical style. Roark works briefly at another firm, then opens his own office but has trouble finding clients and closes it down. He gets a job in a granite quarry owned by Francon. There he meets Francon's daughter Dominique, a columnist for The New York Banner, while she is staying at her family's estate nearby. They are immediately attracted to each other, leading to a rough sexual encounter that Dominique later calls a rape. Shortly after, Roark is notified that a client is ready to start a new building, and he returns to New York. Dominique also returns to New York and learns Roark is an architect. She attacks his work in public, but visits him for secret sexual encounters.
Ellsworth M. Toohey, who writes a popular architecture column in the Banner, is an outspoken socialist who shapes public opinion through his column and a circle of influential associates. Toohey sets out to destroy Roark through a smear campaign. He recommends Roark to Hopton Stoddard, a wealthy acquaintance who wants to build a Temple of the Human Spirit. Roark's unusual design includes a nude statue modeled on Dominique; Toohey persuades Stoddard to sue Roark for malpractice. Toohey and several architects (including Keating) testify at the trial that Roark is incompetent as an architect due to his rejection of historical styles. 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 entirely in the world she has, which shuns Roark and praises Keating. She marries Keating and turns herself over to him, doing and saying whatever he wants, such as persuading potential clients to hire him instead of Roark.
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 is so strongly attracted to Dominique that he pays Keating to divorce her, after which Wynand and Dominique are married. Wanting to build a home for himself and his new wife, Wynand discovers that Roark designed every building he likes and so hires him. Roark and Wynand become close friends; Wynand is unaware of Roark's past relationship with Dominique.
Washed up and out of the public eye, Keating pleads with Toohey to use 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 in exchange for complete anonymity and Keating's promise that it will be built exactly as designed. After taking a long vacation with Wynand, Roark returns to find that Keating was not able to prevent major changes from being made in Cortlandt's construction. Roark dynamites the project to prevent the subversion of his vision.
Roark is arrested and his action is widely condemned, but Wynand decides to use his papers to defend his friend. This unpopular stance hurts the circulation of his newspapers, and Wynand's employees go on strike after Wynand dismisses Toohey for disobeying him and criticizing Roark. Faced with the prospect of closing the paper, Wynand gives in and publishes a denunciation of Roark. At his trial, Roark makes a speech about the value of ego and integrity, and he is found not guilty. Dominique leaves Wynand for Roark. Wynand, who has betrayed his own values by attacking Roark, finally grasps the nature of the power he thought he held. He shuts down the Banner and commissions a final building from Roark, a skyscraper that will serve as a monument to human achievement. Eighteen months later, the Wynand Building is under construction. Dominique, now Roark's wife, enters the site to meet him atop its steel framework.