Brain-machine interfaces (BMIs) can be transformative for people living with chronic paralysis. BMIs translate brain signals into computer commands, bypassing neurological impairments and enabling people with neurological injury or disease to control computers, robots, and more with nothing but thought. State-of-the-art BMIs have already made this future a reality in limited clinical trials. However, high performance BMIs currently require highly invasive electrodes in the brain. Device degradation limits longevity to about 5 years. Their field of view is small, restricting the number, and type, of applications possible. The next generation of BMI technology should include being longer lasting, less invasive, and scalable to sense activity from large regions of the brain. Functional ultrasound neuroimaging is a recently developed technique that meets these criteria. In this present study, we demonstrate the first online, closed-loop ultrasonic brain-machine interface. We used 2 Hz real-time functional ultrasound to measure the neurovascular activity of the posterior parietal cortex in two nonhuman primates (NHPs) as they performed memory-guided movements. We streamed neural signals into a classifier to predict the intended movement direction. These predictions controlled a behavioral task in real-time while the NHP did not produce overt movements. Both NHPs quickly succeeded in controlling up to eight independent directions using the BMI. Furthermore, we present a simple method to “pretrain” the BMI using data from previous sessions. This enables the BMI to work immediately from the start of a session without acquiring extensive additional training data. This work establishes, for the first time, the feasibility of an ultrasonic BMI and prepares for future work on a next generation of minimally invasive BMIs that can restore function to patients with neurological, physical, or even psychiatric impairments.