Towards the end of this book Ginny participates in the battle inside the Ministry of Magic, but is forced to withdraw from the action due to a broken left ankle. She joins Dumbledore's Army and is one of five members who accompany Harry in his attempt to rescue Sirius Black from the Department of Mysteries. During the last part of the book, Ginny breaks up with Michael due to his sulking over Ravenclaw's defeat in the Quidditch Cup final, later replacing him with Dean Thomas. When Umbridge punishes Harry with a "lifetime" Quidditch ban, Ginny replaces him as Gryffindor Seeker. In Order of the Phoenix, Ginny had "given up on Harry months ago" (though this is merely a ruse as Hermione previously advised her to pretend to not be as interested in Harry and go out with a few other boys so Harry would eventually notice her), and has a boyfriend, Michael Corner, whom she met at the Yule Ball. In Goblet of Fire, her role was larger as she attends the Quidditch World Cup and the Yule Ball with Neville Longbottom and can be seen in background appearances. She has little involvement in Prisoner of Azkaban, though she is studying at Hogwarts throughout the book. Lucius Malfoy had slipped the diary into Ginny's cauldron in Flourish and Blotts prior to the term. During the climax of the story, it is revealed that she opened the Chamber of Secrets, and is attacking Muggle-born students while being possessed by Tom Riddle's old school diary. Ginny is a first-year student in Harry Potter and the Chamber of Secrets, in which she develops a crush on Harry and is sorted into Gryffindor. After realizing Harry's identity, Ginny asks her mother if she can board the Hogwarts Express to see him. Ginny first appears in Harry Potter and the Philosopher's Stone, when Harry encounters the Weasley family at King's Cross station and they help him to reach Platform 9¾. Rowling stated that Harry "needs to be with someone who can stand the demands of being with Harry Potter, because he's a scary boyfriend in a lot of ways." By the later part of the series, Ginny and Harry "are total equals" and "worthy of each other." The author also commented that she enjoyed writing the "big emotional journey" that both characters go through, and that she really liked Ginny as a character.
In a joint interview with The Leaky Cauldron and Mugglenet, Rowling revealed that she "always knew" that Ginny and Harry "were going to come together and then part." The author explained that, as the series progresses, Harry, and by extension the reader, discovers that Ginny is in fact the ideal girl for Harry. Over the course of the series, Ginny becomes a strong witch who shows herself to be independent and capable, fighting alongside Harry on more than one occasion as he battles against the Dark Arts. I think you get hints of that, because she does some pretty impressive stuff here and there". Rowling, "the backstory with Ginny was, she was the first girl to arrive in the Weasley family in generations, but there's that old tradition of the seventh daughter of a seventh daughter and a seventh son of a seventh son, so that's why she's the seventh, because she is a gifted witch. She attended Hogwarts School of Witchcraft and Wizardry, and was sorted into Gryffindor house, along with the rest of her family. Ginny Weasley is a pureblood witch born on 11 August 1981, the seventh child and only daughter of Arthur and Molly Weasley.