In this paper, a three-dimensional (3D) photodetector based on a single wall carbon nanotube (SWCNT) and graphene heterojunction has been fabricated by a self-rolled-up process. In the designed structure, graphene acted as the conductive channel and SWCNTs absorbed the incident light ranging from the visible to near-infrared bands. Compared to planar (two-dimensional, 2D) devices, 3D microcavities provided a natural resonant cavity to enhance the optical field, which improved the photoresponsivity. This 3D heterojunction photodetector realized a broadband photodetection from 470 to 940 nm with an ultrahigh photoresponsivity of 4.9 × 10 4 A W -1 (@ 590 nm) and 1.9 × 10 4 A W -1 (@ 940 nm), a fast photoresponse speed of 1.6 ms, and an excellent sensitivity of 2.28 × 10 11 Jones. Besides, the fabricated photodetector showed favorable mid-infrared detection with a photoresponsivity of 3.08 A W -1 at 10.6 μm. Moreover, the photodetector exhibited a promising room-temperature imaging capability. The 3D heterojunction photodetector would provide a feasible pathway to realize graphene-based photodetectors with high performance and could be extended to be integrated with other light absorptive materials.