An all-carbon memristive synapse is highly desirable for hardware implementation in future wearable neuromorphic computing systems. Graphene oxide (GO) can exhibit resistive switching (RS) and may be a feasible candidate to achieve this objective. However, the digital-type RS often occurring in GO-based memristors restricts the biorealistic emulation of synaptic functions. Here, an all-carbon memristive synapse with analog-type RS behavior was demonstrated through photoreduction of GO and N-doped carbon quantum dot (NCQD) nanocomposites. Ultraviolet light irradiation induced the local reduction of GO near the NCQDs, therefore forming multiple weak conductive filaments and demonstrating analog RS with a continuous conductance change. This analog RS enabled the close emulation of several essential synaptic plasticity behaviors; more importantly, the high linearity of the conductance change also facilitated the implementation of pattern recognition with high accuracy. Furthermore, the all-carbon memristive synapse can be transferred onto diverse substrates, showing good flexibility and 3D conformality. Memristive potentiation/depression was stably performed at 450 K, indicating the resistance of the synapse to high temperature. The photoreduction method provides a new path for the fabrication of all-carbon memristive synapses, which supports the development of wearable neuromorphic electronics. A graphene-based device can help computer chips behave more like human brains by transmitting current across thread-like wires. Neural synapses store memories by accessing different types of conductive states. Chinese researchers led by Haiyang Xu at Northeast Normal University in Changchun and Zhenhui Kang at Soochow University in Suzhou now demonstrate that graphene sheets with different conductivity levels—caused by adding or removing oxygen atoms—can also exhibit synapse-like behavior. The team developed a carbon-nitrogen composite to sandwich between two graphene electrodes with high and low levels of conductivity. Exposing the composite to ultraviolet light created numerous tiny filaments between the electrodes that physically restrict electron flow and provide gradual smooth transitions between the graphene electrodes’ two conductive states. The organic framework of this device also provides inherent flexibility for wearable devices. All-carbon memristive synapse is built through photo-reduction of a nanocomposite comprised of graphene oxide and N-doped carbon quantum dots. The analog-type resistive switching was demonstrated, which enabled the emulation of synaptic learning and pattern recognition with high accuracy. The all-carbon devices possess excellent transferability, flexibility and resistance to high temperature, showing the potential for the development of wearable neuromorphic computing system.