In this study, we adopt an improved Bayesian approach based on free-knot B-spline bases to study the spatial and temporal distribution of the b-value. Synthetic tests show that the improved Bayesian approach has a superior performance compared to the Bayesian approach as well as the widely used maximum likelihood estimation (MLE) method in fitting the real variation of b-values. We then apply the improved Bayesian approach to North China and find that the b-value has a clear relevance to seismicity. Temporal changes of b-values are also investigated in two specific areas of North China. We interpret sharp decreases in the b-values as useful messages in earthquake hazard analysis.