During a luncheon of Senate Democrats on Thursday, Senator Joe Manchin jumped from his seat to help his colleague, dislodging the blockage in McCaskill's throat but accidentally injuring her in the process.
McCaskill, who represents Missouri, thanked the senior West Virginia senator on Twitter.
"And a sore rib for a few weeks is no big deal. I play hurt," she added. "The work goes on."
McCaskill, 64, and Manchin, 70 are two of the most vulnerable Senate Democrats up for re-election in November.
Henry Heimlich, a thoracic surgeon who had seen people choke -- and some die -- in restaurants, developed his eponymous maneuver in 1974. Heimlich died in late 2016.
The technique, performed by standing behind the choking victim and using one's hands to apply pressure to the lower diaphragm, is believed to have saved tens of thousands of lives, including former US president Ronald Reagan and Hollywood icon Elizabeth Taylor.