The ex-ambassador is the first woman to win a Republican primary, but Donald Trump is still way ahead.
She lost in South Carolina, her home state. But she is the first woman to win a Republican primary in US history.
Mr Trump however has a huge lead over Ms Haley and is likely to face Joe Biden in the November election.
The BBC’s US partner CBS reports that Ms Haley will receive all 19 Republican delegates who were up for grabs in Washington DC, giving her 43 delegates nationwide – well behind Mr Trump’s 247.
Ms Haley, a former US ambassador to the UN, won 62.9% of the vote, to Mr Trump’s 33.2%.
It is seen as a largely symbolic win, as the capital is a heavily Democrat-leaning jurisdiction, with only about 23,000 registered Republicans in the city.
Source: Nikki Haley beats Donald Trump in Washington DC for first primary victory