At this point, US 40 widens to a four-lane divided highway and turns back to the east, entering the city of Hagerstown. Here, the road passes north of residential areas before heading near businesses and coming to a cloverleaf interchange with I-81. Past this interchange, the route intersects the northern terminus of MD 910 before it curves southeast and splits into the one-way pair of Washington Avenue eastbound and West Franklin Street westbound, carrying two lanes in each direction. US 40 passes through residential areas before the eastbound direction becomes West Washington Street and the route heads into commercial areas, intersecting US 11. Past this junction, the one-way pair passes under railroad tracks carrying CSX's Lurgan Subdivision and Norfolk Southern's Hagerstown District lines and enters the commercial downtown of Hagerstown. At the intersection with Potomac Street, the road name changes to East Washington Street eastbound and East Franklin Street westbound. US 40 leaves downtown Hagerstown and the directions of the route rejoin as four-lane divided Dual Highway, intersecting the western terminus of MD 64 and passing a mix of homes and businesses. The road curves to the south-southeast and crosses Antietam Creek as it continues through developed areas, briefly widening to six lanes as it passes several businesses. At the southeastern edge of Hagerstown, the route reaches a cloverleaf interchange with I-70. Following this interchange, US 40 leaves Hagerstown and becomes National Pike, soon narrowing to a two-lane undivided road and passing through farmland and residential development with some woods. The road comes to an intersection with MD 66 in the community of Beaver Creek before it heads to the north of Mason-Dixon Dragway and the community of Mount Lena. Farther southeast, the route leaves the Hagerstown Valley as it ascends forested South Mountain, turning south and passing to the east of Greenbrier State Park. At the summit of the mountain, US 40 curves southeast and crosses over I-70 and the Appalachian Trail.