To solve the problem of signal-noise ratio change caused by spectroscopy absorbance, scattering and noise interference resulting from sample accumulation, which caused analysis error, effects of sample state and test condition on near infra-red analysis results were studied. near infra-red spectrograms were collected under different thickness, loading times and different loading tightness, and the data were compressed using principal component analysis. BP neural network models were established based on genetic algorithm, and the prediction performance of different sample state models were compared by determination coefficient, and the sample test conditions were optimized. The experimental results show that repeated loading times and sample tightness will not significantly improve predictive capability of the model. While the sample loading thickness is 0.5 mm, the determination coefficient of testing set R2 of moisture, ash, volatile matter and heat prediction model respectively are 0.936 6, 0.791 6, 0.894 9 and 0.857 5, which show good performace of the model.