In vivo¯ber photometry is a powerful technique to analyze the dynamics of population neurons during functional study of neuroscience. Here, we introduced a detailed protocol for¯ber photometry-based calcium recording in freely moving mice, covering from virus injection,¯ber stub insertion, optogenetical stimulation to data procurement and analysis. Furthermore, we *** Corresponding authors. This is an Open Access article published by World Scienti¯c Publishing Company. It is distributed under the terms of the Creative Commons Attribution 4.0 (CC-BY) License. Further distribution of this work is permitted, provided the original work is properly cited. applied this protocol to explore neuronal activity of mice lateral-posterior (LP) thalamic nucleus in response to optogenetical stimulation of primary visual cortex (V1) neurons, and explore axon clusters activity of optogenetically evoked V1 neurons. Final con¯rmation of virus-based protein expression in V1 and precise¯ber insertion indicated that the surgery procedure of this protocol is reliable for functional calcium recording. The scripts for data analysis and some tips in our protocol are provided in details. Together, this protocol is simple, low-cost, and e®ective for neuronal activity detection by¯ber photometry, which will help neuroscience researchers to carry out functional and behavioral study in vivo.