Shinji Aoba is in police custody in hospital and is being treated for burns before he can be questioned.
The fire swept through Kyoto Animation (KyoAni) on Thursday, claiming at least 33 lives and injuring many people in one of Japan’s mass killings in years.
People who witnessed Shinji Aoba’s arrest said they heard him complaining that the company had stolen his ideas.
In the wake of the attack, dozens of people have gathered outside the premises of the studio, laying flowers and offering prayers.
A crowdfunding campaign has also raised more than $1.3m (£1.04m) to assist victims and their families.
KyoAni produces films and graphic novels, and is well regarded by fans for the quality of its productions.
What do we know about the suspect?
Police detained Shinji Aoba on suspicion of setting fire to the building.
The BBC’s Tokyo Correspondent Rupert Wingfield-Hayes says CCTV footage from a nearby petrol station appears to show him filling up two containers with petrol shortly before the incident.
The suspect’s relationship with the company is still unclear, along with his potential motive. People who witnessed the suspect’s arrest said he was visibly angry and could be heard complaining that he had been plagiarised.
Kyoto Animation’s president has said he recently received threatening letters, but has no idea if they were connected to the attack.
The fire broke out at the three-storey building at about 10:30 local time (01:35 GMT) on Thursday.
Eyewitnesses described a loud explosion followed by the blaze, which people jumped out of windows to escape from.
“It was like I was looking at hell,” a local woman told Asahi Shimbun newspaper.
Around 70 people were in the building when the fire started, and some 36 people have reportedly been taken to hospital.
Authorities said most of the victims were found piled up on a stairway leading from the building’s third floor up to the roof, where they collapsed trying to escape.
Kyodo news agency said firefighters had found the door to the roof was shut, leaving people trapped inside.
The blaze has since been put out, and police are searching the site for evidence in their investigation. Knives have also reportedly been found at the scene.
In response to the incident, the studio has cancelled screenings for the trailer of its latest film, a spin-off of the popular swimming anime series Free. It has also delayed a collaboration with Keihan Main Line, a railway service between Kyoto and Osaka.
Another Japanese animation studio, David Production, has postponed the broadcast of its latest episode of Fire Force. The animated series centres on a group of firefighters who have the ability to manipulate fire.
Who is Kyoto Animation?
Kyoto Animation was founded in 1981 and has produced popular animation shows including K-On and The Melancholy of Haruhi Suzumiya.
The studio also creates film versions of some of its popular franchises, and released the standalone feature A Silent Voice in 2016 to critical acclaim.
The studio is known for paying its animators a regular salary, breaking with the industry’s standard of paying per frame – which is seen as putting extreme pressure on staff.
It is also the first successful studio outside Tokyo, Prof Ryusuke Hikawa from Meiji University told NHK.