BackgroundThere has been little research on the long-term clinical outcomes of patients discharged due to undiagnosed fevers of unknown origin (FUO). The purpose of this study was to determine how fever of unknown origin (FUO) evolves over time and to determine the prognosis of patients in order to guide clinical diagnosis and treatment decisions.MethodsBased on FUO structured diagnosis scheme, prospectively included 320 patients who hospitalized at the Department of Infectious Diseases of the Second Hospital of Hebei Medical University from March 15, 2016 to December 31,2019 with FUO, to analysis the cause of FUO, pathogenetic distribution and prognosis, and to compare the etiological distribution of FUO between different years, genders, ages, and duration of fever.ResultsAmong the 320 patients, 279 were finally diagnosed through various types of examination or diagnostic methods, and the diagnosis rate was 87.2%. Among all the causes of FUO, 69.3% were infectious diseases, of which Urinary tract infection 12.8% and lung infection 9.7% were the most common. The majority of pathogens are bacteria. Among contagious diseases, brucellosis is the most common. Non-infectious inflammatory diseases were responsible for 6.3% of cases, of which systemic lupus erythematosus(SLE) 1.9% was the most common; 5% were neoplastic diseases; 5.3% were other diseases; and in 12.8% of cases, the cause was unclear. In 2018–2019, the proportion of infectious diseases in FUO was higher than 2016–2017 (P< 0.05). The proportion of infectious diseases was higher in men and older FUO than in women and young and middle-aged (P< 0.05). According to follow-up, the mortality rate of FUO patients during hospitalization was low at 1.9%.ConclusionsInfectious diseases are the principal cause of FUO. There are temporal differences in the etiological distribution of FUO, and the etiology of FUO is closely related to the prognosis. It is important to identify the etiology of patients with worsening or unrelieved disease.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12879-023-08436-0.