No, the 2006 novel The Boy in the Striped Pajamas by John Boyne is not based on a true story. John Boyne, an Irish author of ten novels for adults and five for young people, has called it a fable. He states that he was careful to change some details and never give the real name of the concentration camp, Auschwitz (the main character, Bruno, calls the place "Out-With"). Boyne has stated that he wanted younger readers to think about the fences that divide us. He has said that he wanted to inspire younger readers to tear down these metaphorical fences where ever they may find them.
The novel was made into a film, and both have come under fire for their historical inaccuracies. Critics have said that students will not understand the horrors of the Holocaust if they don't understand that Boyne's work is fictional. In Auschwitz, for example, children were not kept alive unless they were able to work as much as adults did. Also, in reality the fence where the two boys meet in the novel would have been electric, thus disallowing most of the interaction taking place in the novel.
It is a much different book than Holocaust survivor Elie Wiesel's Night or The Diary of Anne Frank. However, comparisons to those two classic works may not be fair considering that Wiesel and Frank's works are nonfiction (or, in Wiesel's case, at least very much grounded in truth), and Boyne's work is fiction.