The study of cotton stalk extraction resistance provides important parameters for the design of cotton stalk harvesting machinery. To investigate the effects of soil moisture content, cotton stalk diameter, and extraction angle on the extraction force of densely planted cotton stalks, this paper designs a real-time measurement system based on virtual instrument technology and conducts field tests. The tests were carried out in cotton fields at the First Farm in Aral City, Xinjiang, using the cotton variety “Xiulu Zhong 70”. Single-factor experiments were conducted with extraction angle and stalk diameter as influencing factors. A combined three-factor experiment was performed under the following conditions: soil moisture contents of 21.87% and 26.32%; extraction angles of 25°, 30°, and 35°; and cotton stalk diameters of 8.50–9.00 mm, 10.00–10.50 mm, and 11.50–12.00 mm. The results show that the minimum extraction force is required when the extraction angle is 30°. Soil moisture content significantly affects the extraction force, which increases with stalk diameter. The combined test results indicate that the order of significance of the three factors is as follows: cotton stalk diameter (A), extraction angle (B), and soil moisture content (C). The optimal combination is A1B1C2, corresponding to a diameter of 8.50–9.00 mm, an extraction angle of 35°, and a soil moisture content of 26.32%. Based on comprehensive analysis, the recommended extraction angle range is 30–35°. The proposed system can efficiently complete cotton stalk extraction force tests, and the collected data provide valuable references for the design of cotton stalk harvesting machinery. By appropriately selecting the extraction angle and conducting harvesting under suitable soil moisture conditions, it is possible to reduce power consumption and improve production efficiency.