Yes, Shrek is based on a children's book of the same name by William Steig, although the movie takes many liberties with the original story.