Rizwan Khan (Shahrukh Khan) is a Muslim child who grew up with his brother Zakir (Jimmy Shergill) and his mother (Zarina Wahab) in a middle class family in the Borivali section of Mumbai. Rizwan is different from other children; However, he has certain gifts, particularly a special ability to repair mechanical things. His difference leads to special tutoring from a reclusive scholar and extra attention from his mother, all which leads to a heightened level of jealousy from his brother Zakir, who eventually leaves his family for a life in the United States.
Despite this resentment, as an adult Zakir sponsors Rizwan to come and live with him in San Francisco after the death of their mother. It is at this time that Zakir's wife, Haseena (Sonya Jehan) diagnoses Rizwan with Asperger's syndrome. Rizwan also begins to work for Zakir and in the process he meets a Hindu woman, Mandira (Kajol) and her young son, Sameer or Sam (Yuvaan Makaar), from a previous marriage. Mandira is a hairdresser by profession. Despite Zakir's hostility to the match, they marry and settle down in the fictional town of Banville, where both Mandira and Sameer take Rizwan's last name as their own. They also live next door to the Garrick family. Sameer is close to their young son, Reese (Kenton Duty and Michael Arnold) while Mark (Dominic Renda) is a reporter and Sarah (Katie A. Keane) is a friend of Mandira.
The Khan's perfect existence gets disrupted, however, after the 11 September attacks on New York City. Mark goes to cover the war in Afghanistan and dies there. At the same time, the Khan family begins to experience post 9-11 prejudice in their community and Reese begins to turn against Sam as well. One afternoon, an argument between them turns into a racially motivated schoolyard fight between Sameer and a number of older students. Reese tries to stop the fight but is held back and Sam dies from his injuries. A shattered Mandira blames Rizwan for his death stating that Sameer "died only because his name was Khan." She then tells Rizwan that she no longer wants to be with him. When he asks her what he has to do to be together with Mandira, she sarcastically tells him that he has to tell the people of the United States and the President that his name is Khan and that he is not a terrorist.
Rizwan takes Mandira's request seriously, and thus sets out on a journey that takes him from one US state to another, in order to first meet President George W. Bush and later the new President-elect. During this quest, he travels to Wilhemina, Georgia and befriends Mama Jenny and her son Joel. Later, in Los Angeles, he prays in a Mosque and overhears violent rhetoric from Faisal Rahman (Arif Zakaria). He reports this to the FBI but there is no response at that moment. Later, while waiting in a crowd to meet President Bush and repeating again and again, "My name is Khan and I am not a terrorist," Rizwan is arrested and placed in a prison by police who misinterpret his statement.
While in the prison he is interrogated as a terrorist suspect and meets the psychiatrist Radha (Sheetal Menon) who believes he is innocent. He is later released after a media campaign by some Indian student reporters Raj (Arjun Mathur) and Komal (Sugandha Garg) and Bobby Ahuja (Parvin Dabas), who prove his innocence by unearthing his attempts to inform the FBI about Faisal Rahman. After his release, he returns to hurricane-hit Wilhemina to help Mama Jenny and her son. His efforts attract media attention and numerous Muslims come to help as well.
At the same time, Reese confesses to Mandira and reveals the identity of the boys who killed Sam. She informs Detective Garcia (Benny Nieves) who has been assisting her on the case, and Detective Garcia arrests them. Mandira later gets a call from Sarah to forgive Rizwan, "I've lost my husband, don't lose him."
Mandira realises her error, she joins Rizwan in Georgia and their love rekindles. However at the moment she arrives, Rizwan is stabbed by a follower of Faisal Rahman (Sumeet Raghavan), accusing him of being a traitor of Islam, and Rizwan is rushed to the hospital. With Mandira's help, Rizwan survives and meets President-elect Barack Obama (Christopher B. Duncan) who tells him: "Your name is Khan and you are not a terrorist".