Rizwan Khan is a Muslim child who grew up with his brother and his mother in a middle class family in the 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 diagnoses Rizwan with Asperger Syndrome. Rizwan also begins to work for Zakir and in the process he meets a Hindu woman, Mandira and her young son, Sameer, 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 while Mark is a reporter and Sarah is a friend of Mandira.
The Khan's perfect existence gets disrupted, however, after September 11 war 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 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 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. 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 thinking he said he was a terrorist.
While in the prison he is interrogated as a terrorist suspect and meets the psychiatrist Radha who believes he is innocent. He is later released after a media campaign by some Indian student reporters Raj and Komal and Bobby Ahuja, 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 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, 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 who tells him: "Your name is Khan and you are not a terrorist". The film concludes with Rizvan and Mandira going back home.