A reliable estimation of the earthquake magnitude and epicentral distance within a few seconds after the P‐wave arrival is of great importance for earthquake early warning systems. This study aims to investigate the relations between the envelope of the initial part of the P wave with epicentral distance and magnitude of the earthquakes related to the tectonic conditions of Iran. To this end, the accelerometer waveforms of 17 earthquakes with moment magnitudes less than 7.8 and epicentral distances less than 150 km are considered. A simple function with the form of y=Bt.exp(−At) is fitted to the initial part of the waveform envelope on time windows of 2, 3, 4, and 5 s by the least‐squares method, which is constructed simply by keeping the past maximum amplitude at every moment. Parameters A and B are obtained to scale magnitude and epicentral distance as well. The results show that −logΔ is proportional to logB, in which Δ denotes the epicentral distance. The distance‐scaling relations for all of the time windows indicate standard deviations between ±0.16 and ±0.17 km for logΔ. Comparing to the adopted relation in the early warning system of the Japan Meteorological Agency, results illustrate a relatively distinct slope and intercept, which arises from differences in tectonic structure and features of the earthquake sources in two areas. The same process for records with epicentral distances less than 50 km is also repeated. Results indicate smaller standard deviations between ±0.13 and ±0.14 km for four time windows. Considering the arrangement of hazardous faults in many populated districts of Iran, including Tehran, utilization of the obtained relations is recommended for distances less than 50 km. Moreover, the current study represents two distance‐dependent relations between magnitudes with Pmax and A×Pmax within the initial 3 s of P‐wave arrivals with standard deviations of ±0.42 and ±0.46 magnitude units, respectively.