STANFORD, Calif.—Yesol Huh walked into a gym here for an intramural-basketball game last year, eager to help her team notch its first victory.

Then she spotted the opposing center.

He was 6-foot-9 and warmed up by violently dunking the ball in the Stanford University court. "We're never winning this game," Ms. Huh recalls thinking.

Her prediction was a slam-dunk: The center was Mark Madsen, a former player in the National Basketball Association. Mr. Madsen "had such good rebounding instincts, we eventually gave up and let him have every one," says Travis Johnson, one of Ms. Huh's teammates. Their side lost by 30 points.

Mr. Madsen is one of several former-top-tier athletes aiming to extend their careers by joining recreational and beer leagues, sometimes spoiling the fun for the shorter, slower or clumsier folks they play against.