A massive trading bet boomeranged on J.P. Morgan Chase & Co., leaving the bank with at least $2 billion in trading losses and its chief executive, James Dimon, with a rare black eye following a long run as what some called the "King of Wall Street."

The losses stemmed from wagers gone wrong in the bank's Chief Investment Office, which manages risk for the New York company. The Wall Street Journal reported early last month that large positions taken in that office by a trader...