The deal will see up to 200 of the games broadcast during the season on BT Sport 1, BT Sport 2 and ESPN, with seven live games a week including the NBA Finals in June.
“The NBA is simply the best basketball in the world... existing NBA fans will love our coverage, and we look forward to converting many more,” said head of BT Sport Simon Green.
The win comes just weeks after BT secured TV rights to European Champions League football games for £900m from 2015.
“With BT Sports’ first rate presentation and formidable portfolio of premium sports content, fans can now look forward to more NBA action than ever before in the UK and Ireland,” said NBA vice president of distribution Dan Markham.
The multi-year deal has a cost in the tens of millions, but BT did not disclose the exact length or cost.