Tumor is a highly complex tissue composed of different kinds of components including tumor and normal cells. Recently, many experiments found tumor-infiltrating lymphocytes (TILs) in tumors, and the abundance of TILs have an important impact on tumor progression and response to therapy. In this study, we propose a novel Immune Components Exploration (ICE) approach to explore tumor microenvironment components by analyzing microarray and RNA-sequencing data. ICE is a reference-based hierarchical Bayesian deconvolution method, and it integrates heterogeneous tumor data with pure immune cell-specific expression profiling to infer cell proportion. This approach combines a location-and-scale adjustment model and random effect regression into a unified framework and involves spike-and-slab prior to archive automatic gene selection, and Markov chain Monte Carlo (MCMC) approach is applied to ICE for posterior inference. The performance of ICE was systematically assessed on both simulated datasets and public real datasets including whole blood tissue and solid tumors. Altogether, ICE not only improves accuracy but also provides a flexible way to predict cell component from bulk tumor.