The USS Massachusetts played a pivotal role in the Naval Battle of Casablanca, which began in the early hours of November 8th. Its mission was to neutralize key French defenses, including coastal artillery positions on El Hank, submarines, and the partially completed battleship Jean Bart, anchored in the harbor with only half of its main battery installed. Massachusetts commenced firing at 07:04 from a distance of 22,000 meters (72,000 feet). Shortly thereafter, it came under fire from Jean Bart, prompting a response at 07:40.
Concurrently, the cruisers Wichita and Tuscaloosa engaged the French batteries on El Hank and the submarine pens, while Massachusetts concentrated its fire on Jean Bart. The French naval forces, led by the cruiser Primauguet, put up fierce resistance. Massachusetts, alongside the American cruisers, successfully repelled attempts by French destroyers to attack the fleet before resuming their assault on Jean Bart. During the course of the battle, Massachusetts scored five hits on Jean Bart and disabled its main battery turret.
With Jean Bart incapacitated, Massachusetts and the other ships redirected their fire toward coastal artillery batteries, an ammunition depot, and merchant vessels in the harbor. One of Massachusetts' 16-inch shells also struck the floating dry-dock containing the submarine Le Conquérant. While the dry dock sank, Le Conquérant emerged unscathed and managed to set sail, only to be later sunk by a PBY Catalina aircraft at sea. On November 11th, the French defenders agreed to a ceasefire, permitting the ships of Task Group 34.1 to be reassigned for other operations. Massachusetts departed for the United States on November 12th to prepare for future engagements in the Pacific Theater.