Unmanned aerial vehicles (UAVs) hold significant potential for various indoor applications, such as mapping, surveillance, navigation, and search and rescue operations. However, indoor positioning is a significant challenge for UAVs, owing to the lack of GPS signals and the complexity of indoor environments. Therefore, this study was aimed at developing a Wi-Fi-based three-dimensional (3D) indoor positioning scheme tailored to time-varying environments, involving human movement and uncertainties in the states of wireless devices. Specifically, we established an innovative 3D indoor positioning system to meet the localisation demands of UAVs in indoor environments. A 3D indoor positioning database was developed using a deep-learning classifier, enabling 3D indoor positioning through Wi-Fi technology. Additionally, through a pioneering integration of fingerprint recognition into wireless positioning technology, we enhanced the precision and reliability of indoor positioning through a detailed analysis and learning process of Wi-Fi signal features. Two test cases (Cases 1 and 2) were designed with positioning height intervals of 0.5 m and 0.8 m, respectively, corresponding to the height of the test scene for positioning simulation and testing. With an error margin of 4 m, the simulation accuracies for the (X, Y) dimension reached 94.08% (Case 1) and 94.95% (Case 2). When the error margin was 0 m, the highest simulation accuracies for the H dimension were 91.84% (Case 1) and 93.61% (Case 2). Moreover, 40 real-time positioning experiments were conducted in the (X, Y, H) dimension. In Case 1, the average positioning success rates were 50.8% (Margin-0), 72.9% (Margin-1), and 81.4% (Margin-2), and the corresponding values for Case 2 were 52.4%, 74.5%, and 82.8%, respectively. The results demonstrated that the proposed method can facilitate 3D indoor positioning based only on Wi-Fi technologies.