Recent advances in nanofluidics have enabled the confinement of water down to a single molecular layer. Such monolayer electrolytes show promise in achieving bio-inspired functionalities through molecular control of ion transport. However, the understanding of ion dynamics in these systems is still scarce. Here, we develop an analytical theory, backed up by molecular dynamics simulations, predicting strongly nonlinear effects in ion transport across quasi-two-dimensional slits. We show that under an electric field, ions assemble into elongated clusters, whose slow dynamics result in hysteretic conduction. This phenomenon, known as memristor effect, can be harnessed to build an elementary neuron. As a proof-of-concept, we carry out molecular simulations of two nanofluidic slits reproducing the Hodgkin-Huxley model, and observe spontaneous emission of voltage spikes characteristic of neuromorphic activity.