According to Baidu map query, Peking University can take Metro Line 4 to the Summer Palace. Get on the bus from Dongmen Station of Peking University, take Line 4, Anheqiao North, take 3 stops to Beigongmen Station, take Exit D in the southwest, and then walk 5 10 meters to the Summer Palace.
You can also take bus No.332, get on at the west gate of Peking University, take 4 stops, get off at Beigongmen subway station, and then walk 260 meters.