In the long-Term condition monitoring of mechanical equipment based on vibration signals, data acquisition with a high sampling rate generates a large amount of vibration signal data, which is a challenge to data storage and transmission. To solve this problem, a lossless compression algorithm for mechanical vibration signal based on 2D block adaptive quantization (2D-BAQ) is proposed. The method mainly consists of data segmentation, data transformation, adaptive quantization, and data encoding. Firstly, the original data is divided into blocks and subjected to 2D discrete cosine transform (DCT) to obtain frequency domain data. Then the DCT coefficients are quantified by using data association in the frequency domain data. Finally, the quantization parameters and quantization errors are encoded with lossless arithmetic coding. The compression performance of our proposed lossless compression method for mechanical vibration signal is compared with other compression methods. The experimental results show that our method 2D-BAQ can effectively achieve lossless compression of mechanical vibration signal, and outperform other common compression methods.