Interest in the design and manufacture of RNA and DNA aptamers as apta-biosensors for the early diagnosis of blood infections and other inflammatory conditions has increased considerably in recent years. The practical utility of these aptamers depends on the detailed knowledge about the putative interactions with their target proteins. Therefore, understanding the aptamer-protein interactions at the atomic scale can offer significant insights into the optimal apta-biosensor design. In this study, we consider one RNA and one DNA aptamer that were previously used as apta-biosensors for detecting the infection biomarker protein TNF-α, as an example of a novel computational workflow for selecting the aptamer candidate with the highest binding strength to a target. We combine information from the binding free energy calculations, molecular docking, and molecular dynamics simulations to investigate the interactions of both aptamers with TNF-α. The results reveal that the RNA aptamer has a more stable structure relative to the DNA aptamer. Interaction of aptamers with TNF-α does not have any negative effect on its structure. The results of molecular docking and molecular dynamics simulations suggest that the RNA aptamer has a stronger interaction with the protein. Also, these findings illustrate that basic residues of TNF-α establish more atomic contacts with the aptamers compared to acidic or pH-neutral ones. Furthermore, binding energy calculations show that the interaction of the RNA aptamer with TNF-α is thermodynamically more favorable. In total, the findings of this study indicate that the RNA aptamer is a more suitable candidate for using as an apta-biosensor of TNF-α and, therefore, of greater potential use for the diagnosis of blood infections. Also, this study provides more information about aptamer-protein interactions and increases our understanding of this phenomenon.