The invention discloses an image lossless compression method implemented on basis of an FPGA, and belongs to the technical field of image processing of machine vision. The image lossless compression method comprises the steps of: initializing coding parameters into zero, wherein the coding parameters comprise data of a predicted row, an accumulated predicted residual and context combination accumulated occurrence times; selecting two reference pixel points to calculate a residual of a current pixel point according to pixel values of the two reference pixel points; according to a relationship between a pixel value P of the current pixel point and the pixel values of the two reference pixel points, selecting a corresponding residual coding method to carry out coding on the residual of the current pixel point; and after completing residual coding of all the pixel points of a to-be-compressed image, updating the coding parameters. According to the invention, improvement and optimization are carried out on the basis of an FELICS (Fast and Efficient Lossless Image Compression System) algorithm, a decompression speed of an upper computer is improved when an image compression ratio is ensured, and an algorithm running speed can be matched with a gigabit Ethernet transmission speed.