From the airport you can get into the district by the Airport Express Subway to Dongzhimen Station and then change to line 2 in either direction.
From Beijing Railway Station you can get into the district by a short subway ride on line 2. From Beijing West Station a few kilometers southwest of Xicheng you will have to take a bus a taxi into the district.
Xicheng is well served by subway lines.