Steven Wilson, who disappeared during a period of unescorted leave from Leverndale Hospital in Glasgow on March 30, was traced by police to a location in Ayrshire last night.
The public had been warned not to approach the 47-year-old, who was jailed for manslaughter after a stabbing outside a pub in London in 1988.
A spokesman for the Scottish Government said: "Strathclyde Police has informed us that restricted patient Steven Wilson has been apprehended and returned to hospital."
Strathclyde Police Chief Inspector Graham McInarlin had earlier said they had received reports of a number of potential sightings of Wilson, who has previously spent time in Carstairs. He was known to have contacted prostitutes while in hospital and vice squad officers were also involved in the search for him.
Wilson's disappearance had led to criticism of the SNP Government's record on controlling prisoners under rehabilitation.
However, Justice Minister Kenny MacAskill has defended the handling of the case. When asked about the details of the case at the Scottish Police Federation annual conference in Aviemore yesterday, Mr MacAskill said: "All matters relating to the state hospital relate to health. He is not a prisoner but a patient. I don't think there was any cover up - but it would not be for me to comment. This would be a matter for health."