In recent years, hyperspectral imaging has become a very popular subject with its use in different application areas. Hyperspectral images that require high storage areas need to be compressed with high efficiency and quality. In this study, a novel method that uses automatic adaptive luminance transform and three-dimensional discrete cosine transform (3D-DCT) for lossy compression of hyperspectral images is proposed. Firstly, spectral bands in hyperspectral image are grouped and automatic adaptive luminance transform is performed as a preprocessing stage in the proposed method. Each group is compressed by using DCT and Huffman encoding. The aim of the proposed luminance transform is to increase compression performance by decreasing luminance and contrast differences between band images in a group. In the experimental results, the proposed method and different versions of luminance transform are compared on Cuprite, Moffet Field, Jasper Ridge and Pavia University hyperspectral images. Comparison is carried out using signal-to-noise ratio and average spectral distance metrics. Besides, anomaly and target detection performances are also compared for compressed images. The proposed method has been shown to increase compression performance of 3D-DCT up to an average of 40% rate, especially at low bit rates.