Officers were called to Mayfield Grove, Harrogate, just after 10pm on Friday where they found the suspect in the street.
A 48-year-old man was found inside a nearby flat with serious injuries and was later pronounced dead at the scene by ambulance staff.
The force said a 23-year-old man remains in custody and where he is being questioned on suspicion of murder.
Detective Superintendent Fran Naughton said: “Our investigation is well under way and we can confirm this was a contained incident. A man is now in police custody and we do not believe there is any wider risk to the public.
“However, many residents will be understandably anxious about what has happened. There will be a greater police presence in the area, which we hope residents will find reassuring, and officers will be working closely with the community.
“Our specially trained officers are supporting the deceased man’s family at this difficult time.”
Anyone who was in the Mayfield Grove area of Harrogate on Friday night and saw any suspicious activity is asked to contact North Yorkshire Police by calling 101, quoting incident number 12210072144. Alternatively, contact Crimestoppers anonymously on 0800 555 111.