Wireless Sensor Network (WSN) has an enormous scope of utilizations in detecting different parameters such as temperature, pressure, sound, pollution, etc. The sensed data in each sensor node are a valuable one. To communicate the information to the base station for further processing, a lot of strategies are available. Each sensor senses the data in different sampling rate depending upon the sudden raise in the sensing parameters. Data communication to the base station is very critical due to the dynamicity of the environment during the stipulated time.The sensed data should reach the base station before the data becomes invalid due to the violation of the deadline. In order to avoid deadline violation so that the sensed data becomes useless, this paper proposing a novel data collection algorithm based on the popular Earliest Deadline First (EDF) scheduling algorithm. The various simulation parameters are taken into account to verify the performance of the proposed method and the result shows that it achieves high throughput, low delay, high Packet Delivery Ratio (PDR) and low energy consumption.