Two-photon optogenetics has become an indispensable technology in neuroscience, due to its capability in precise and specific manipulation of neural activities. A scanless holographic approach is generally adopted to meet the requirement of stimulating neural ensembles simultaneously. However, the commonly used disk patterns fail in achieving single-neuron resolution, especially in axial dimension, and their inherent speckles decrease stimulation efficiency. Here, we propose a novel speckle-free, beaded-ring pattern for high-axial-resolution optical stimulation of neurons in vivo. Using a dye pool and a fluorescent thin film as samples, we verify that, compared to those with disk patterns, higher axial resolution and better localization ability can be achieved with beaded-ring patterns. Furthermore, we perform two-photon based all-optical physiology with neurons in mouse S1 cortex in vivo, and demonstrate that the axial resolution obtained by beaded-ring patterns can be improved by 24% when stimulating multiple neurons, compared to that of disk patterns.