J.K. Rowling’s professional middle initial stands for Kathleen.
Rowling was born Joanne Rowling, without a middle name. When Bloomsbury prepared to publish Harry Potter and the Philosopher’s Stone, the publisher asked for two initials rather than her full first name. The intention was to make the author’s gender less immediately obvious to potential readers. Rowling chose K in honour of her paternal grandmother, Kathleen.
The result was the professional name J.K. Rowling. The author is also sometimes called Joanne Rowling, particularly in biographical contexts. Her first marriage brought the surname Arantes, but her books have chiefly appeared under Rowling. The extra initial is therefore not a forgotten birth name or a reference to a fictional character; it was selected for publishing and commemorative reasons before the first novel appeared.