Detecting continuous nanohertz gravitational waves (GWs) generated by individual close binaries of supermassive black holes (CB-SMBHs) is one of the primary objectives of pulsar timing arrays (PTAs). The detection sensitivity is slated to increase significantly as the number of well-timed millisecond pulsars will increase by more than an order of magnitude with the advent of next-generation radio telescopes. Currently, the Bayesian analysis pipeline using parallel tempering Markov chain Monte Carlo has been applied in multiple studies for CB-SMBH searches, but it may be challenged by the high dimensionality of the parameter space for future large-scale PTAs. One solution is to reduce the dimensionality by maximizing or marginalizing over uninformative parameters semi-analytically, but it is not clear whether this approach can be extended to more complex signal models without making overly simplified assumptions. Recently, the method of diffusive nested (DNest) sampling shown the capability of coping with high dimensionality and multimodality effectively in Bayesian analysis. In this paper, we apply DNest to search for continuous GWs in simulated pulsar timing residuals and find that it performs well in terms of accuracy, robustness, and efficiency for a PTA including $mathcal{O}(10^2)$ pulsars. DNest also allows a simultaneous search of multiple sources elegantly, which demonstrates its scalability and general applicability. Our results show that it is convenient and also high beneficial to include DNest in current toolboxes of PTA analysis.