 Harry Potter and the Order of the Phoenix is a 2007 British @-@ American fantasy film directed by David Yates and distributed by Warner Bros. Pictures . It is based on the novel of the same name by J. K. Rowling . The film , which is the fifth instalment in the Harry Potter film series , was written by Michael Goldenberg ( making his screenwriting debut ) and produced by David Heyman , David Barron , and Lionel Wigram . The story follows Harry Potter , Ron Weasley , and Hermione Granger , as they search for Voldemort's remaining Horcruxes in an effort to destroy the Dark Lord .