What is the year, make, model? What speeds does this happen?
Sounds to me like you have a false antilock brakes (ABS) activation.
Antilock brakes keep your wheels from locking up during a panic stop.
Most ABS false activations are caused by faulty speed sensors. A technician needs to drive the vehicle and monitor the speed sensors on a scantool. When the problem occurs, the tech can pinpoint which sensor is acting up through data stream.