Agriculture is the most important sector of the Indian economy and employs 50% of the country’s forces. But, in recent times the economic contribution of agriculture to India’s GDP is steadily declining. A major problem is the absence of an energy-efficient and reliable system for real-time monitoring of soil’s condition. The paper proposes a smart alert and irrigation system with real-time monitoring of soil’s condition. The proposed system detects the soil’s moisture content and temperature. Using NodeMCU development kit, the data are sent to the cloud-based IoT platform for round the clock real-time monitoring of the soil’s condition. A Message Queue Telemetry Transport communication protocol is used for data transmission. The cloud-based IoT platform analyses the collected data and sends alert messages and controls the irrigation system according to the pre-set threshold conditions. The proposed system is secure, economically feasible, reliable and energy-efficient which brings automation and IoT technology to the agriculture sector.