Harry Potter and the Half-Blood Prince, the sixth film in the series, opens in cinemas on 15 July.
One of the largest campaigns run by Microsoft, it will include ads on Xbox Live targeting 16 to 34 year-old males. The ads will highlight the "darker, edgier side of the film". Further ads and content will run on the Windows Live instant messenger service.
MSN will host a 'Harry Potter zone' with downloads, picture galleries and exclusive video clips, while its homepage and entertainment and movie channels will run editorial pieces on the film.
Microsoft aims to create a campaign that will attract a new, younger audience, while not alienating the franchise's fans who have grown up with the films.
The campaign also includes an online competition.
Microsoft ran similar promotions two years ago, to promote the DVD release of Harry Potter and the Order of the Phoenix.