Drain corn and grill on a rack set 5 to 6 inches over glowing coals until husks are charred, about 10 minutes. Shuck corn and grill until kernels are browned in spots, about 10 minutes.
While corn is grilling, in a small bowl whisk together mayonnaise and cayenne. Using the small teardrop-shaped holes on a four-sided grater grate cotija.
Brush mayonnaise mixture onto hot corn and sprinkle with cojita.