The invention discloses a vegetable planting device and a vegetable planting method based on artificial intelligence, and belongs to the technical field of vegetable planting. The vegetable planting device comprises a vegetable greenhouse main body and an intelligent control system arranged at one side of the vegetable greenhouse main body, and the side directions of the vegetable greenhouse main body are fixedly connected with side columns. According to the vegetable planting device, through the mutual cooperation of a sun shading device, a first winding drum, a second winding drum, a motor, a torsion spring, a water removal box, a water removal roller, a water scraping seat, a positioning wheel, a photosensitive sensor, a humidity-sensitive sensor, a microprocessor and other structures which are designed, the growth and development of vegetables can be effectively promoted, the conditions that water vapor is generated and water drops are condensed in the sun shading device due to large temperature difference in the vegetable greenhouse main body can be prevented, on one hand, the light transmittance of the sun shading device is guaranteed, on the other hand, sunlight can be prevented from being condensed and irradiating on the vegetables when flowing through the water drops, the vegetables can be effectively prevented from being burnt, and the condition of the vegetables is effectively guaranteed.