In this paper, we propose a nonparametric independence test based on the mutual information. Distinguished from the previous work, we propose to estimate the mutual information via a conditional density form, whose dimension could be reduced to 1 with novel projection methods. The optimal projection direction, which we name as maximum unit direction, is estimated by maximizing a penalized mutual information. An independence test is later on carried out based on the newly estimated mutual information and is shown to be insensitive to the dimensions. The test is consistent against all dependent alternatives, and could detect local alternatives at an exact rate. Numerical results indicate that the test is more powerful compared with other existing independence tests.