When the oil price is low, it is essential to optimize an EOR process in low-permeability reservoir, especially in unconventional shale oil reservoirs. Gas huff-n-puff, has shown to be an effective EOR method. This paper is to optimize this process to enhance oil recovery in shale oil reservoirs. To optimize the huff-n-puff process, we need a field model. However, such field data were not available to us. In this paper, we first upscale laboratory-scale data to field-scale. In the laboratory, methane huff-n-puff experiments were conducted using the Wolfcamp core plugs with the same length of 2'' and different diameters (1.5'', 2'', 3'' and 4'') at injection pressure of 2000 psi. The cores were saturated with the Wolfcamp crude oil. A composition model was built to history match the experimental data. Then the model was scaled up to a field-scale model for the optimization study. The study is to optimize: 1) gas injection time and injection rate; 2) gas production time and production rate; 3) soaking time; 4) gas injection pore volume. The simulation results show that the most effective optimization is to increase the pressure gradient during huff and puff periods so that the maximum average pressure gradient in the matrix can be achieved at a fixed operation time. The pressure gradient is increased by increasing injection pressure or decreasing production pressure. Before reaching the set injection pressure or production pressure, the oil recovery in one huff-n-puff cycle increases, as the injection and production times are increased. After reaching the set injection pressure and production pressure, increasing the huff or puff time will not lead to a significantly more oil recovery. There exist optimum values for injection rate during huff process and production rate during puff process. When the rate is less than the optimal value, the oil recovery increases as the operation rate increases. When the operation rate is higher than the optimal value, increasing the injection rate will lead to slightly decline in the oil recovery, while further increasing production rate will cause insignificant oil recovery increase. We also found that adding soaking time will decrease oil recovery.