A major limitation of liquid cooling is that the temperature of the coolant rises down the stream, which gradually reduces the heat transfer from the heat source to the coolant causing a large temperature gradient (or temperature non-uniformity) along the flow direction. In this study, a technique has been presented to efficiently minimize the temperature non-uniformity of liquid-cooled heat sinks by incorporating simple geometrical modifications. The technique is demonstrated for a densely-packed concentrated photovoltaic module (CPV) by using a heat sink with cylindrical pinfin microstructures. Several cases of the proposed variable height pinfin (VHP) heat sink were investigated by systematically varying the height of pinfin rows to gradually reduce the heat transfer near the inlet zone while keeping the heat transfer near the outlet zone as close as possible to the conventional uniform height pinfin (UHP) heat sink. The heat sinks were designed for a CPV module consisting of an array of 5 × 5 multi-junction photovoltaic cells illuminated under a solar concentration of 1000 suns. The results showed that the best case of the VHP heat sink achieved a variation of merely 1.56 K in the maximum temperature among the cells, which is 84.1% lower than the UHP heat sink (9.82 K). Moreover, the same case exhibited a 33.1% reduction in the pumping power. However, there is a 2.4% increase in the maximum temperature rise among the cells which is an acceptable tradeoff considering the substantial improvement in the temperature uniformity and pumping power.