Place shallots, red bell pepper, chile peppers, lemongrass, macadamia nuts, garlic, ginger, sugar, turmeric, and salt in a food processor. Pulse into a smooth spice paste.
Heat oil in a large skillet over medium heat. Add spice paste; cook and stir until fragrant, 2 to 3 minutes. Add chicken legs and coconut milk to the skillet; stir well to make sure chicken is coated with sauce. Reduce heat to medium-low. Simmer, covered, until chicken is cooked through, about 40 minutes.
Remove chicken from skillet and let cool, about 15 minutes. Reserve sauce for serving.
Preheat an outdoor grill for medium-high heat and lightly oil the grate.
Grill chicken until skin is dark and caramelized, about 5 minutes per side. Serve with reserved sauce.