The middle name in Joanne Kathleen Rowling is Kathleen.
Rowling was born Joanne Rowling, but her published name became J.K. Rowling. The middle initial was added before publication because Bloomsbury wanted a name that would not immediately identify the author as a woman and feared that boys might avoid a book by a female writer.
Kathleen was chosen in honor of Rowling’s paternal grandmother, Kathleen Ada Bulgen. Rowling did not originally have a middle name at birth, so the added name supplied the second initial used on the books.
The author has often explained that the “K” does not stand for a birth middle name in the ordinary sense. Her public name is therefore best understood as a publishing name built from Joanne and the added Kathleen. The name “J.K. Rowling” is also distinct from her later pen name Robert Galbraith, which she used for detective fiction.