Secure communication is a challenging problem in wireless sensor networks. In this paper, we investigate an attack probability-based deterministic key predistribution method for non-uniform sensor deployment. First, we design a reasonable model for group-based deployment to estimate the attack probability of each deployment group. Second, our proposed model further considers the location of data sink to meet the practical situation. Third, based on this attack model, a deterministic key predistribution mechanism is presented for group-based deployment. The proposed method mainly aims at preserving the integrity of network so that the functionality of each sensor node can be used. To evaluate the proposed method, the issues of memory overhead, communication overhead, and the fraction of total communications compromised after adversaries launch node capture attacks are studied analytically and numerically.