Rizwan Khan (Tanay Chheda) is a Muslimchild who lived with his brother Zakir (Arnav Chhapwale) and his mother (Zarina Wahab) in a middle-class family in the Borivali section of Mumbai. Rizwan has Asperger's syndrome, but he has certain gifts, particularly a special ability to repair 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, who eventually leaves his family for a life in the United States.
Despite this initial resentment, as an adult Zakir (Jimmy Shergill) requests Rizwan (Shah Rukh Khan) 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 diagnoses Rizwan as having Asperger's syndrome. Rizwan begins to work as a product seller in Zakir's company and in the process he meets a Hindu woman, Mandira (Kajol) and her young son, Sameer, from a previous marriage. Despite Zakir's hostility to the match, they marry and settle down in the 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, consisting of Mark, who is a reporter, his wife Sarah and son Reese.
The couples perfect existence is disrupted after the September 11 attacks in 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 Sameer as well. 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 Sameer gets punched and kicked multiple times by the group of older students. Sameer, angry, calls the leader of the gang an asshole, resulting in the leader kicking a soccer ball at Sameer's stomach, knocking him out. The gang threatens to hurt Reese if he tells anyone what happened. Sameer is then taken to the hospital, but dies due to internal bleeding and spleen rupture. Shattered, Mandira blames Rizwan for his death stating that Sameer "died only because his name was Khan", telling Rizwan that she no longer wants to be with him. When he asks her what he has to do in order for them to be together, she tells him sarcastically that he has to tell the people of the United States and the President that "my name is Khan and that I am not a terrorist".
Rizwan, being naive, thus sets out on a journey that takes him from one US state to another, in order to meet the president and get his wife's love back. During this quest, he travels to Wilhemina,a small town in Georgiaand befriends Mama Jenny and her son Joel. Later, in Los Angeles, he prays in a Mosque and overhears violent rhetoric from a Muslim doctor Faisal Rahman. He reports this to the FBI but there is no response at that moment. Later, while waiting in a crowd to meet President George W. Bush and repeating again and again, "My name is Khan and I am not a terrorist," Rizwan is arrested and placed in prison by police who misinterpret his statement as,"My name is Khan and I am a terrorist".
While in the prison, he is brutally interrogated as a terrorist suspect, but meets the psychiatrist, Radha, who believes he is innocent. He is later released after a media campaign by a group of Indian student reporters, 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 Sameer. She informs Detective Garcia who has been assisting her in the case, and the boys are arrested.
After the killers are brought to justice, she joins Rizwan in Georgia. At the moment she arrives to meet him, Rizwan is stabbed by one of Faisal Rahman's followers, who accuses him of being a traitor to Islam. He is then rushed to the hospital. With Mandira's help, Rizwan survives and meets President-elect Barack Obama, who reveals that despite being President-elect himself, Rizwan has been stealing his spotlight and that he knows his name and the fact that he is not a terrorist