Artificial synapses are the key building blocks for low-power neuromorphic computing that can go beyond the constraints of von Neumann architecture. In comparison with two-terminal memristors and three-terminal transistors with filament-formation and charge-trapping mechanisms, emerging electrolyte-gated transistors (EGTs) have been demonstrated as a promising candidate for neuromorphic applications due to their prominent analog switching performance. Here, a novel graphdiyne (GDY)/MoS 2 -based EGT is proposed, where an ion-storage layer (GDY) is adopted to EGTs for the first time. Benefitting from this Li-ion-storage layer, the GDY/MoS 2 -based EGT features a robust stability (variation < 1% for over 2000 cycles), an ultralow energy consumption (50 aJ µm −2 ), and long retention characteristics (>10 4 s). In addition, a quasi-linear conductance update with low noise (1.3%), an ultrahigh G max /G min ratio (10 3 ), and an ultralow readout conductance (<10 nS) have been demonstrated by this device, enabling the implementation of the neuromorphic computing with near-ideal accuracies. Moreover, the nonvolatile characteristics of the GDY/MoS 2 -based EGT enable it to demonstrate logic-in-memory functions, which can execute logic processing and store logic results in a single device. These results highlight the potential of the GDY/MoS 2 -based EGT for next-generation low-power electronics beyond von Neumann architecture.