Police attended the underground accommodation centre attached to Aarau hospital at 6.45am on Saturday and immediately arrested the perpetrator, who was still holding the bloody knife, Aargau police said in a statement.
The two victims were taken to the nearby hospital where the 43-year-old died. The 25-year-old received emergency surgery and is now out of danger.
All three men were Iranian refugees living in the same accommodation centre, said police.
Police have opened criminal proceedings against the 27-year-old perpetrator, who admitted the facts.
The motive for the crime remains unclear, said police.