Van der Waals junctions of two-dimensional materials with an atomically sharp interface open up unprecedented opportunities to design and study functional heterostructures. Semiconducting transition metal dichalcogenides have shown tremendous potential for future applications due to their unique electronic properties and strong light-matter interaction. However, many important optoelectronic applications, such as broadband photodetection, are severely hindered by their limited spectral range and reduced light absorption. Here, we present a p-g-n heterostructure formed by sandwiching graphene with a gapless bandstructure and wide absorption spectrum in an atomically thin p-n junction to overcome these major limitations. We have successfully demonstrated a MoS2-graphene-WSe2 heterostructure for broadband photodetection in the visible to short-wavelength infrared range at room temperature that exhibits competitive device performance, including a specific detectivity of up to 1011 Jones in the near-infrared region. Our results pave the way toward the implementation of atomically thin heterostructures for broadband and sensitive optoelectronic applications.