Preheat an outdoor grill for high heat and lightly oil the grate.
Combine mayonnaise, lime juice, ancho chile powder, and smoked paprika in a bowl; whisk until smooth. Refrigerate until needed.
Bring a large pot of salted water to a boil. Boil corn in the salted water for 5 minutes. Drain the corn.
Place ears of corn on hot grill and cook until the kernels begin to brown and caramelize, 2 to 3 minutes. Turn the corn and continue to cook, turning ears after 1 to 2 minutes, until they are browned with slightly charred, caramelized spots.
Generously brush corn with melted butter and ancho-lime mayonnaise until kernels are coated. Sprinkle ears with Cotija cheese and salt. Garnish with slices of lime.