Heat oil in a large heavy-bottomed pot over medium-high; brown beef on all sides in batches, about 3-4 minutes each. Set aside.
Cook onion in same pot about 5 minutes until soft, scraping up browned bits.
Return beef; stir in ancho and New Mexico chili powders, cumin, garlic powder, cayenne, salt, and pepper to coat evenly.
Stir in stock, tomatoes, paste, and sugar; boil.
Reduce heat to low; cover and simmer 2 hours, stirring every 30 minutes.
Mix masa harina with 1/4 cup water; stir slurry into chili.
Simmer uncovered 30 more minutes to desired thickness. Adjust salt and spices; serve.