In this paper, a primary lens of concentrator photovoltaic (CPV) system is designed by using freeform optics. The designed lens is constructed based on a basic idea of a combination of Fresnel lens and freeform optics, in which the lens is divided into an array of sub-lenses, which are designed using the conservation of optical path length and the edge ray theorem to get uniform irradiance distribution over the receiver. In this design, every sub-lens is designed to guide the direct sunlight over the receiver with uniform irradiance so that the whole of the primary lens will converge uniformly the direct sunlight over the receiver. The structure of the lens is designed firstly by using Matlab program for every sub-lens. The Matlab data of the designed lens structure is then used to build the three-dimensional (3D) lens in LightTools™ software. The ray tracing technique in LightTools™ software is used to find out the optimum structure of the freeform lens. Furthermore, the simulation is performed to estimate the efficiency of the lens as a concentrator of a CPV system by using the light source with the sunlight spectrum. The designed lens can achieve high geometrical concentration ratio and uniform irradiance distribution over the receiver. The simulation results show that the lens can easily reach a high concentration ratio (494 times) with uniform irradiance distribution and good optical efficiency (86%).