Uber Technologies Inc. on Tuesday said it mistakenly underpaid New York City drivers for the past 2½ years, an error that will likely cost it tens of millions of dollars. It is the second time in three months the ride-hailing company has acknowledged it deprived workers of their proper earnings.

Under the terms of its November 2014 nationwide driver agreement, Uber was meant to take its commission, generally 25%, from U.S. drivers based on fares after any taxes and fees were deducted. Uber said that, instead, in New York City...