You didn't say what year car you had, but it sounds like ABS module failure, which is most common on '99 E39s, but occurs on other years too.
The ABS module can be sent off and rebuilt for about $300, or you can buy a new one for about $600 to $700. I've not had that problem myself, so I'm afraid that's about all I can tell you.
2006 Honda Odyssey EXL-RES
2006 Honda Accord V6 EX-L Sedan
1999 BMW 540i 6-Speed (Sold to M3UOND on 9/21/06)
1991 Honda Civic Si - Occasional Beater