generally easiest to reach via taxi.
The only direct public bus to the Mutinyau Great Wall section is a special service of the 867, which only runs during the tourist season (15 Mar-15 Nov). As of May 2012, it departs at 07:00 and 08:30 from the Dongzhimen outer bus station which you can get to by turning left out of the main bus station (arrive at Donzhimen subway, take "H" exit) and going for a 10 minute walk round the other side until you see a parking lot full of buses on your left (don't cross the street). To make it clear the 867 is not numbered when you come up the stairs from the subway. It is a totally separate bus terminal outside the main building. This is where the 867 leaves from, it is not easy to find and you will be hawked heavily by private taxis and mini buses. As of July 2014, route 867 had a very aggressive driver verbally forcing all tourists off at stop around 12km from Mutianyu to waiting hoards of hire minivans. Bus 867 stop sign at Mutianyu has been removed by scammers, and bus comes at 14:00 with same driver but number blanked off front, again angrily refusing to return to Dongzhimen, and drove back to stop 12km from Mutianyu avoiding all in between stops to again force tourists off. Be very wary of this route. The special service of bus 867 to Mutianyu had been cancelled since June 2014. If you still want to get to Mutianyu by bus, it is still possible-you will need to take the bus 867, get off at the Honglousi, the final stop of it, and wait for a special bus service at the return stop of Honglousi (which is opposite the road from the place you get off). The special bus service costs ¥4 each way (¥1.6 with metrocard) and will only depart at 10:00 and 12:00 from Honglousi, and 14:00 and 15:00 from Mutianyu. It costs ¥16 each way (¥6.4 with metrocard) and takes at least 2.5 hr. Also it's possible to use 936 and 916 that runs after that time (every 10-15 minutes) that will take you only to the city of Huairou which is 17 km (11 mi) away from the Wall and around 60 km (37 mi) from central Beijing. This is the faster (1 hour) but slightly more complicated option. From there you have to take a taxi (¥80 for a taxi but you can bargain to 50RMB which is not bad with a large group) for the final 25-30 minutes to the Wall. Note that the stop where you should get off occurs soon after the Huairou tourist center. It is just a regular bus stop but there are rows of minivans and taxis waiting to take people to the wall. The easiest option is stay on 916 until the final stop, and then hire a minivan from there.
Be aware that it is possible that taxi drivers in league with the bus driver (who may be on the bus from Dongzhimen) will try and get you to come off the bus at the wrong stop in order to ensure that you take their taxi (fees until ¥400!). Also beware of people that offer to help you at Dongzhimen, that are in league with the taxi drivers and will point you to the wrong bus (980, for example), and you will end up having to backtrack to Huairou and pay double for the taxi (Great Wall Trek China Expeditions is known to do this). There are also scammers who dress up like they work for the bus system as ticket collectors. For bus 916 there should be no ticket collectors, just ignore anyone but the bus driver, and put 12RMB into the box by the bus door.
For the return journey, the 867 leaves at 14:00 and 16:00 from parking lot 3 - the same place it dropped you off at Mutianyu if you caught it in the morning. Note that on Sunday the 16:00 bus might be really crowded. It is an official looking bus with a number on it so don't be fooled by any other drivers (e.g. minibuses) who try and steal your business. Also, do not be fooled by any taxi drivers who say "no bus!". Post with bus schedule is usually hidden behind minivan or any big car parked in front of it in western part of parking lot to confuse visitors. For those making it back to Huairou, there are usually drivers walking around saying "Huairou."
The last buses to Beijing Dongzhimen from Huairou city are the 936 at 17:00 while the service of the 916 ends at 19:00. Without the Beijing transportation card (that you can purchase at any metro station) the price is ¥16 but with the electronic card expect to pay less than ¥5.