Nightlife in Beijing is mainly concentrated around the three areas of Houhai, Sanlitun, and Chaoyang Park.
The sleepy Houhai district began to develop a few years ago when some bars sprung up on the banks of the lakes in this part of "Old Beijing". Although Houhai has since become a bit of a circus (viz the gaudy "Lotus Market" boardwalk on the South-West bank) there are still some good bars and it's hard to beat the lakeside setting, especially on summer evenings. Try the No Name Bar, which is the un-signposted shack right in front of the Vietnamese restaurant Nuage near Yin Ding bridge between the front and back lakes.

Not far away, in the back alleys behind the Drum Tower is the very popular Bed, a maze of rooms and courtyards with opium beds to stretch out on. (17 Zhangwang Hutong, off Jiu Gulou Avenue, Dongcheng District)
A lot of bars are located around the West and South gates of Chaoyang Park, although the quality is variable. A favourite is Suzie Wong's at the West Gate of Chaoyang Park, with Chinese decor, good music and a good crowd, while expats favour the cheap drinks and pool tables at Black Sun up the road.
Sanlitun is a long-established bar zone in one of Beijing's foreign embassy districts. Sanlitun nightlife is concentrated along North Bar Street which can tend to be local and gaudy, but is still entertaining. A far better bet is to head to Sanlitun Back Street, which just off the North Bar Street to the West, and is home to a couple of decent venues. Poachers Inn has a barny, beer-hall ambience and is packed on weekends, while Kai Club around the corner has good music and cheap drinks, and The Tree Bar around the corner again behind the backpackers hostel is a cosy pub serving good pizza. Bar Blu, in the windowless redbrick Tongli Studios building opposite Poachers, is a slick bar with a rooftop terrace, pleasant in good weather.

Right next to the City Hotel on the corner of Gongti Road North is the infamous Den, a bar and nightclub popular with "vacationing" Mongolian ladies but also good for food at the end of the night/early morning.

A stone's throw away from Sanlitun is local sax player Liu Yuan's CD Cafe Jazz Club, on the 3rd Ring Road by the pedestrian bridge just south of the Agricultural Exhibition Centre. The club features some great live music and is a favourite hangout for stars from the local music scene.
For clubbing, Vics and Mix, both at the North Gate of the Workers' Stadium, are popular. Alternatively, check out one of Beijing's "mega-clubs", like Angel and Babyface on the western side of the Worker's Stadium at the Gongti 100 complex, or Tango, to the north of the Second Ring Road opposite the Lama Temple (Yonghegong).
Meanwhile, for an upmarket drinking location downtown, Red Moon bar at the Grand Hyatt and Centro Bar at the Kerry Center are classy and popular with the after-work crowd. Centro in particular has killer martinis