Heat vegetable oil in a large heavy-bottomed pot over medium-high heat. Working in batches, brown the beef cubes on all sides, about 3-4 minutes per batch. Remove and set aside.
In the same pot, add chopped onion and cook until softened, about 5 minutes, scraping up any browned bits from the bottom.
Return beef to the pot and add ancho chili powder, New Mexico chili powder, cumin, garlic powder, cayenne, salt, and black pepper. Stir to coat the meat evenly.
Add beef stock, diced tomatoes, tomato paste, and brown sugar. Stir well and bring to a boil.
Reduce heat to low, cover, and simmer for 2 hours, stirring every 30 minutes.
Mix masa harina with 1/4 cup water to create a slurry, then stir into the chili to thicken.
Continue simmering uncovered for 30 more minutes until chili reaches desired consistency. Adjust salt and spices to taste before serving.