SMAP (SMAWP) was founded in January 1982, and was suggested by the director of Islamic Education (Pengarah Pendidikan Islam), Ministry of Education (Malaysia), Tan Sri Datuk Paduka Dr Abdul Hamid Othman. This idea came up with the awareness of the Islamic Religion Council of Wilayah Persekutuan (Majlis Agama Islam Wilayah Persekutuan) on building an Islamic Religious School in Kuala Lumpur. After the suggestion was accepted by the government, the school was named Sekolah Menengah Agama Wilayah Persekutuan (SMAWP).

At first, when SMAWP did not own a building, the approximately 500 students (consisted of Form 1, 4, and lower 6 students) were taught at Kolej Islam Klang‘s building in Selangor. The first generation of the students were taught by 40 teachers, led by the school’s first principal, Tuan Hj Muhammad bin Shafie.

Following a demonstration by its students in the school compound in Klang as well as at Ministry’s office at Lebuh Pasar Besar Kuala Lumpur (making front-page coverage by several print medias), after one year of temporary lodging at KIK (now known as KISAS), in January 1983 SMAWP was relocated to a temporary building in the campus of International Islamic University Malaysia (Universiti Islam Antarabangsa Malaysia), in Section 16, Petaling Jaya. In 1985, Tuan Hj Muhamad Yusof bin Abu Bakar became the next principal and served until the end of 1985. During his time, SMAWP won the 1985 Bahas Bahasa Melayu Piala Perdana Menteri.

The next principal, Tuan Hj Muhd Yusof bin Hj Ahmad, continued SMAWP’s legacy. At the same time, the Ministry of Education (Malaysia) solved their problem in April 1987 by lending a building in KM 11, Jalan Labu which was supposed to be the place for a ‘Maktab Perguruan’. The building was given to the school and was officially opened in July 1989 by Duli Yang Maha Mulia Tuanku Jaafar ibni Almarhum Tuanku Abdul Rahman, the Yang di-Pertuan Besar of Negeri Sembilan at that time. The name SMAWP was later changed to Sekolah Menengah Agama Persekutuan (SMAP) and remains the same until today.

A year later, the school members, consisted of 73 teachers and 1000 students, led by the next principal, Tuan Hj Mahmud bin Mohd Rashid, successfully uplifted the school’s status and resulted in SMAP being ‘adopted’ by the International Islamic University Malaysia(Universiti Islam Antarabangsa Malaysia) and Forestry Department (Jabatan Perhutanan).

On 16 June 1989, Tuan Hj Abu Bakar bin Lebai Mat came to replace Tuan Hj Mahmud bin Mohd Rashid (who moved to Kuching) as the school’s principal. He was responsible for the spearheading of Kegiatan Kumpulan Khidmat Sekolah. After six years of service, he was positioned to be the principal at Maktab Perguruan Islam Bangi and the absence of a principal lasted about nine months.

On 17 December 1994, the next principal, Tuan Hj Abdul Rahman bin Halim led the school to its first national record – being the first school in Malaysia to attain 100% of Sijil Pelajaran Malaysia candidates achieving Grade 1 (Gred Satu). He was later replaced by Tuan Hj Paiman bin Jemo, the senior assistant of Students’ Affairs (Penolong Kanan Hal Ehwal Murid); as Tuan Hj Abdul Rahman was offered the principal position at Maktab Perguruan Islam Bangi.

SMAPL continued under the leadership of Tuan Hj Paiman bin Jemo, who was known to stress on the importance of SMAPL being ‘the Centre of Excellence’. During his time of service, in 1997, Dato’ Seri Najib Tun Razak (then Minister of Education) came to the school to announce the SPM 1996 results himself. The same year, SMAPL gained the title Juara Berganda, being the best school for SPM and STPM examination in 1996. SMAPL also maintained the record for baing the first school in Malaysia to have 100% of Sijil Pelajaran Malaysia candidates achieving Grade 1 for three years in a row: 1996, 1997, 1998.

In 1998, Tuan Hj Mat Yunoh bin Hj Dollah replaced him and became the principal from 1998 to 2004. Before that Tuan Hj Mat Yunoh was the senior assistant of Students’ Affair. In 2002, SMAP gained a three-storey building for the Biology laboratories, workshops for the Studies of Living Skills, Form 1 classes and the Islamic Art and Culture studio.

In 2004, Tuan Hj Abdullah bin Endut came in to replace Tuan Hj Mat Yunoh as principal. In 2005, SMAP gained another new building, a two-storey ICT lab, as a faculty to enhance student intellectual skills in computers and programming.

The next principal was Puan Hajah Khuzaimah binti Haji Sulaiman. She was the ‘Pengetua Cemerlang JUSA C’ and the first female principal of the school, in service from 2005 until 13 March 2007. In 2007, SMAP celebrated its Silver Jubilee, denoting its 25 years of establishment.

The next principal is Puan Hajah Radziah binti Abdul Samad who officially reported for service on 16 April 2007. During her time, SMAP gained another four-storey building which is known as Block G, containing the open hall, Dewan Seri Lestari, the Foreign Language laboratories, Visual Arts room, three classes and also the dental treatment room. SMAPL has gained the title Sekolah Kluster Kecemerlangan and Sekolah Berprestasi Tinggi.

The current principal is Dato’ Dr Haji Abdul Jalil bin Ahmad, also a ‘Pengetua Cemerlang JUSA C’. In 2017, the new musolla, Musolla Imam As-Syafi’e has been inaugurated by the Mufti of Negeri Sembilan, Sahibus Samahah Dato’ Hj Yusof bin Ahmad, also an ex-principal of the school. The building will also be officiated in a ceremony by the Menteri Besar of Negeri Sembilan, Y.A.B Dato’ Seri Utama Haji Mohamad Bin Haji Hasan. The current senior assistant of Students’ Affairs is Tuan Haji Rojahan bin Abdullah, who used to serve at SM Agama Persekutuan Bentong (SUPERB).