Beatrix Potter wrote her first story of Peter Rabbit in the form of a letter for Noel Moore.

Noel Morre was the son of Annie Moore, Beatrix’s former governess. Beatrix heard Noel was ill, so she wrote entertaining stories to keep him in good spirits.

Source