A new method is proposed to design gradient refractive-index metamaterial lens antennas by optimizing both the refractive-index distribution of the lens and the feed directivity. Comparing to the conventional design methods, source optimization provides a new degree of freedom to control aperture fields effectively. To demonstrate this method, two lenses with special properties based on this method are designed, to emit high-efficiency plane waves and fan-shaped beams, respectively. Both lenses have good performance and wide frequency band from 12 to 18 GHz, verifying the validity of the proposed method. The plane-wave emitting lens realized a high aperture efficiency of 75%, and the fan-beam lens achieved a high gain of 15 dB over board bandwidth. The experimental results have good agreement with the design targets and full-wave simulations.