In this paper, we propose a novel QoS guaranteed algorithm for real-time applications in IEEE 802.15.4 protocol. The IEEE 802.15.4 standard provides a Guaranteed Time Slot (GTS) mechanism to allocate a specific duration within a superframe structure for time-critical transmissions. However, there are many weak points to support real-time applications. We suggest a new slot allocation algorithm that enables guaranteed services to be more efficient. The proposed algorithm also allocates a new guaranteed time slot dynamically to support real-time applications which have periodic messages. We evaluate the delay bounds and the throughput of the proposed scheme compared with original protocol. We then show that our proposal improves the bandwidth utilization and guarantees real-time features more strictly.