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.