Nest building and nest site selection of the Black-billed magpie Pica pica sericea were studied in Beijing, China, during 2004China, during -2006. A total of 814 Magpie nests have been checked and measured. The results showed that the first nest building occurred at the end of December, but most pairs started in February. Mostly, a new nest was built for each nesting attempt; sometimes an old nest was renovated. Magpies mobbed potential predators very intensively during the breeding season, especially congeners. Magpies build nests in strong and tall trees (51% of all nests in Populus sp.). If there is no suitable tree for building, they also build their nests on man-made constructions, such as telegraph poles, water towers, etc. Nests were always located in the upper part of the crown, domed and with one or two entrances. Four types of habitat were identified in this study: urban residential area, urban park, suburban area, and exurb. Analysis of the factors that may affect nest site selection in different habitats indicated that the height of the nesting tree was the most important one. From the outer exurb to the city centre, with the increasing number of people and cars, the height of the trees Magpies chose for nesting increased accordingly. Magpies can find enough food and face less predation pressure in the urban area, which enables them to breed successfully in the urban environment of Beijing.