Robotic harvesting of cotton bolls combines the advantages of manual picking and mechanical harvesting, including selective picking and reduced labor dependency. Thus, we designed, developed, and tested a cotton-picking robotic arm equipped with a depth camera, a 4-DoF manipulator, and a vacuum-type end-effector. Convolutional neural networks were implemented for cotton boll recognition, while an artificial neural network-assisted particle swarm optimization-based model was utilized for solving inverse kinematics. Linear actuators, controlled by a microcontroller and relays, positioned the end-effector for cotton boll harvesting. Laboratory testing resulted in picking 44–49 cotton bolls per hour, taking approximately 73.0 s per boll. During field testing, the robotic arm picked 40–42 bolls per hour with an average time of 86.0 s per boll. Picking efficiency ranged from 76.19% to 85.71% in the lab and 66.32% to 72.04% in the field. The complex structure of cotton plants sometimes hindered the end-effector’s path, resulting in lower picking efficiency during field testing. As observed in present study, manual pickers achieved a significantly higher picking rate, harvesting 1.381 kg of cotton per hour, nearly 4.7 times more than the robotic arm. Manual pickers achieved 98.04% picking efficiency, significantly higher than the robotic arm’s 68.25%. This significant difference in efficiency is due to the agility, adaptability, and decision-making abilities of human pickers. The developed robotic arm demonstrates competitive efficiency in the domain of harvesting robots, contributing to advancements in robotic agriculture. Future research and development efforts in this field hold the potential to enhance the efficiency and productivity of robotic cotton harvesters.