William D. Ruckelshaus, who resigned as deputy attorney general rather than carry out President Richard M. Nixon’s illegal order to fire the independent special Watergate prosecutor in the constitutional crisis of 1973 known as the “Saturday Night Massacre,” died on Wednesday at his home in Seattle. He was 87.