Before identifying the ending, it is important to recognize the conflict featured in Anna Sewell's 1877 novel, Black Beauty.
First, the book is the unique for being narrated in the first person by the horse, Beauty. The novel begins with a young Beauty who learns the ropes of being a horse from his mother and alongside other colts. When he comes of age, he is purchased by Squire Gordon. He makes friends with others of Squire Gordon's animals, leading an overall happy existence.
Unfortunately, when Squire Gordon must sell Beauty to leave the countryside, Beauty's existence becomes less pleasant and more changeable. He is hurt when he is ridden by a drunk driver. After the accident, Beauty must become a stable horse rather than a carriage one. Thereafter, Beauty has several different owners and is alternately neglected, starved, and then nursed to recovery.
The resolution occurs when Beauty finds his final home with one Joe Green. Green sees Beauty for sale as a groom for three mistresses looking to buy a horse. This Joe Green had in fact been trained under John Manly, who was a groom for Beauty's original owner, Squire Gordon. Because of Green's recollection of Beauty in his adolescence, he recommends that his mistresses purchase Beauty, and the reader is left to assume that Beauty is treated well by these owners thereafter.