Rare genetic variants have recently been studied for genome-wide associations with human complex diseases. Existing rare variant methods are based on the hypothesis-testing framework that predefined variant sets need to be tested separately. The power of those methods is contingent upon accurate selection of variants for testing, and frequently, common variants are left out for separate testing. In this article, we present a novel Bayesian method for simultaneous testing of all genome-wide variants across the whole frequency range. The method allows for much more flexible grouping of variants and dynamically combines them for joint testing. The method accounts for correlation among variant sets, such that only direct associations with the disease are reported, whereas indirect associations due to linkage disequilibrium are not. Consequently, the method can obtain much improved power and flexibility and simultaneously pinpoint multiple disease variants with high resolution. Additional covariates of categorical, discrete, and continuous values can also be added. We compared our method with seven existing categories of approaches for rare variant mapping. We demonstrate that our method achieves similar power to the best methods available to date when testing very rare variants in small SNP sets. When moderately rare or common variants are included, or when testing a large collection of variants, however, our method significantly outperforms all existing methods evaluated in this study. We further demonstrate the power and the usage of our method in a whole-genome resequencing study of type 1 diabetes.