In photoacoustic (PA) imaging, tissue absorbs specific wavelengths of light. The absorbed energy results in thermal expansion that generates ultrasound waves that are reconstructed into images. Existing commercial PA imaging systems for preclinical brain imaging are limited by imprecise positioning capabilities and inflexible user interfaces. We introduce a new visible charge-coupled device (CCD) camera-guided photoacoustic imaging (ViCPAI) system that integrates an ultrasound (US) transducer and a data acquisition platform with a CCD camera for positioning. The CCD camera accurately positions the US probe at the measurement location. The programmable MATLAB-based platform has an intuitive user interface. In vitro carbon fiber and in vivo animal experiments were performed to investigate the precise positioning and imaging capabilities of the ViCPAI system. We demonstrated real-time capturing of bilateral cerebral hemodynamic changes during (1) forelimb electrical stimulation under normal conditions, (2) forelimb stimulation after right brain focal photothrombotic ischemia (PTI) stroke, and (3) progression of KCl-induced cortical spreading depression (CSD). The ViCPAI system accurately located target areas and achieved reproducible positioning, which is crucial in animal and clinical experiments. In animal experiments, the ViCPAI system was used to investigate bilateral cerebral cortex responses to left forelimb electrical stimulation before and after stroke, showing that the CBV and SO2 in the right primary somatosensory cortex of the forelimb (S1FL) region were significantly changed by left forelimb electrical stimulation before stroke. No CBV or SO2 changes were observed in the bilateral cortex in the S1FL area in response to left forelimb electrical stimulation after stroke. While monitoring CSD progression, the ViCPAI system accurately locates the S1FL area and returns to the same position after the probe moves, demonstrating reproducible positioning and reducing positioning errors. The ViCPAI system utilizes the real-time precise positioning capability of CCD cameras to overcome various challenges in preclinical and clinical studies.