When you think of a movie set entirely on the Great Wall of China, you think of Matt Damon. Oh, you don't? Well, somebody did, and thus The Great Wall was born. Starring Damon as William Garin, a white warrior, The Great Wall is about a man who decides to help the Chinese defend the Great Wall against monsters on the other side. Putting all the controversy of having a white man be the star of a movie set entirely in China, something that could explain the casting is if the film is loosely based on a true story, and if William from The Great Wall is based on a real person.
Yet like the monsters they fight in the film, William is not based on a real person. In fact, the entire film is a piece of historical fiction, with little basis in reality other than the existence of the wall itself. The Great Wall is fantasy, through and through, so it's safe to say that William isn't actually a historical figure. The film, according to The Atlantic, takes place in 11th century, at a time when the Chinese were most definitely not fighting against mythical creatures. So, if you were hoping that William's whiteness could be excused by historical fact, I'm sorry to have to tell you that it can't be.
The Great Wall has been under fire for putting a white male protagonist on the forefront of a film set in China. Rarely do Hollywood movies feature Asian leads, or even predominantly Asian casts, so to see Damon lead The Great Wall as a version of the white savior stereotype is disappointing. After the film was accused of whitewashing, Damon defended himself, saying explicitly that the role of William was written for a white man, not an Asian actor. "The whole idea of whitewashing, I take that very seriously," Damon told the Associated Press, via The Guardian. "It's a monster movie and it's a historical fantasy and I didn't take a role away from a Chinese actor. It wasn't altered because of me in any way," he continued.
That might be because the film was actually worked on by six white, male writers. In the words of director Yimou Zhang, spoken in an interview with Entertainment Weekly, "the story is really told from an American's perspective."
So, William is not based on a real person, but you can think of him as the American perspective of The Great Wall.