Ford F 150 XTL, 4.6 engine. After market exhaust, Flow Master. 22" wheels When driving and then coming to a stop and I let off the gas pedal and get down between 15 and 20 mph the engine will surge up to a 1000 rpm's and stay there and I will continue to stay at 15 to 20 mph with my foot off the gas and the brake. When I come to a complete stop it will be a hard stop, engine racing at 1000 rpm's and will drop with in an instance to 500 rpm's.
What year is the truck?
Did you add on any other aftermarket devices to the trucks engine that is not original factory equipment?
Is the check engine light on and if it is what codes are set?
Sensors that are out of adjustment, vacuum leaks and after market equipment that is not calibrated for the operation of the engine can cause the engine to race.
The use of a professional scanner can help you diagnose the problem. This can give you the sensor readings and can help you to determine the cause of the problem by using the measurements and fuel trim readings to isolate the problem.
Get back to me with as much information you can so I can help you diagnose the problem.