The U.S. mulled a nuclear strike on mainland China in 1958 to defend Taiwan from an invasion by the Communist nation. Documents posted online by Daniel Ellsberg of the Pentagon Papers fame show that the U.S. expected the Soviet Union to retaliate with nuclear weapons, and it was a risk that was considered worth taking.
Ellsberg was quoted as saying that the documents date back to the 1970s, and he decided to come out with them given current tensions between the U.S. and China over Taiwan. The U.S. nuclear strike would have targeted Chinese air bases and if that did not work, further strikes as far north as Shanghai were proposed. The plans were given up when China stopped artillery strikes on islands controlled by the KMT government in Taiwan.