When Sharon Draper wrote Out of My Mind, she was not trying to replicate any person's actual experiences, so no, it is not based on a true story. However, Draper was inspired to write the novel because she has a disabled daughter whom she believes is very bright. Having such a close relationship with a child with a disability allowed Draper to create Melody as a realistic character.
Additionally, Draper did extensive research from books and volunteered with disabled children at a summer camp so that she could accurately portray the challenges Melody faces. Similarly, she observed how disabled people are treated in social situations, so the experiences that Melody has in the book are true-to-life. Yet Draper wasn't trying to make Melody a representative of a class of people. She wanted Melody to be a unique person in her own right so that readers would understand that each person is an individual and has unique strengths and weaknesses. As the author states, "The story of Melody is fictional, of course, but is based on the reality of thousands of intelligent children and adults who are trapped inside uncooperative bodies."