Next-generation sequencing (NGS) followed by metagenomic enables the detection and identification of known as well as novel pathogens. It could be potentially useful in the diagnosis of encephalitis, caused by a variety of microorganisms. The aim of the present study was to evaluate the sensitivity of isothermal RNA amplification (Ribo-SPIA) followed by NGS metagenomic analysis in the detection of human immunodeficiency virus (HIV) and herpes simplex virus (HSV) in cerebrospinal fluid (CSF). Moreover, we analyzed the contamination background. We detected 10 HIV copies and 10 HSV copies. The analysis of control samples (two water samples and one CSF sample from an uninfected patient) revealed the presence of human DNA in the CSF sample (91 % of all reads), while the dominating sequences in water were qualified as 'other', related to plants, plant viruses, and synthetic constructs, and constituted 31 % and 60 % of all reads. Bacterial sequences represented 5.9 % and 21.4 % of all reads in water samples and 2.3 % in the control CSF sample. The bacterial sequences corresponded mainly to Psychrobacter, Acinetobacter, and Corynebacterium genera. In conclusion, Ribo-SPIA amplification followed by NGS metagenomic analysis is sensitive for detection of RNA and DNA viruses. Contamination seems common and thus the results should be confirmed by other independent methods such as RT-PCR and PCR. Despite these reservations, NGS seems to be a promising method for the diagnosis of viral infections.