Mass spectrometry imaging (MSI) enables label-free mapping for hundreds of molecules in biological samples, with high sensitivity and unprecedented specificity. Conventional MSI experiments are relatively slow, limiting their utility for applications requiring rapid data acquisition, such as intraoperative tissue analysis or 3D imaging. Recent advances in MSI technology focus on improving spatial resolution and molecular coverage, further increasing acquisition times. Herein, a deep learning approach for dynamic sampling (DLADS) reduces the number of required measurements to improve MSI throughput, in comparison with conventional methods. DLADS trains a deep learning model to dynamically predict molecularly informative tissue locations for active mass spectra sampling and reconstructs high-fidelity molecular images, using only the sparsely sampled information. Hardware and software integration of DLADS with nanospray desorption electrospray ionization (nano-DESI) MSI demonstrates a 2.3-fold improvement in throughput with a line-wise acquisition mode. Meanwhile, simulations indicate that a 5 to 10-fold throughput improvement may be achieved using the pointwise acquisition mode.