There were most definitely historians in ancients times. I'm only familiar with Europe, so I'll only name European (i.e. Roman and Greek) historians, but I'm sure you could find other notable examples in other places (e.g. China).
From Greece the three most famous are Herodotus, the "Father of History", Thucydides, and Xenophon, but there were lots more. Herodotus, who wrote The Histories, specifically stated he was writing to tell the story of the great men and the deeds they performed. Thucydides was writing more of what we might consider a true history of the Peloponnesian War in his work, aptly titled, History of the Peloponnesian War. Finally, Xeonphon wrote a continuation of Thucydides's history entirled Hellinca, but is more famous for his part-autobiography, part-history of the Ten Thousand, entitled Anabasis.
In Rome, there are even more examples, but I'll focus on just the very most famous. Titus Livius, aka Livy, is one of the main sources we have for Roman history up through the reign of Augustus. His History of Rome (Ab Urbe Condita) is his only surviving work, but it is, to my understanding, the most trusted of the works of any ancient Roman historian from that period.
As I said at the outset, this is just a beginning. There are bunches of historians from the ancient world. But its important to also mention that history, as an academic discipline with academic standards and an academic method, did not emerge until the mid to late 19th century. Here, generally, Leopold van Ranke is considered the founder of the modern discipline of history, although methods have evolved considerable since then.
Yes, there were definitely historians. Since /u/Jan_van_Bergen has given the European examples, I'll name a few notable Chinese ones.
Zuo Qiuming 左丘明 was the first historian whose documented work still lasts till today (the Spring Autumn Annals 春秋左传). Even though historians nowadays still debate over his actual name (unfortunately the ancient Chinese go by way too many names to sometimes tell which was his original one), there is no doubting the effort that went into his work, nor his dedication to history. Other than the annals, his other work Discourses of the Countries 国语 was completed after he lost his sight.
His work was regarded as an important classic, and would be studied and referred to by many famous Chinese people to come. So much so was the respect it demanded that during the Han dynasty, prince Liu De 刘德 decided to create a position within the court specifically for the purpose of lecturing about the Spring Autumn Annals 《左氏春秋》博士.
And during the same Han dynasty, there is the Chinese version of the 'father of history' Sima Qian 司马迁. His magnum opus Records of the Grand Historian 史记 records China's history from the mythical Yellow Emperor 黄帝 to the time of Han dynasty's Wu emperor 汉武帝 (totaling over 3000 years of history). And just like his forebear, Sima Qian too suffered for his work - by speaking up for the disgraced general Li Ling 李陵 who had surrendered to the Xiongnu tribe, Sima Qian incurred the Wu emperor's wrath. In the end, the grand historian escaped the death penalty, but was instead castrated.
Records of the Grand Historian is till today regarded as a must read for anyone studying Chinese history, and plenty of the modern Chinese idioms are derived from it. It was also the first work to record history by chapters 传 which followed an important person's biography. This structure would be followed by later historians in the official list of 24 Histories.
Chronologically, the next book to follow would be the Book of Han 汉书. Written by Ban Gu 班固, it covers the rise of the Han dynasty from Liu Bang 刘邦 up till the usurpation by Wang Mang 王莽. Unlike the previous two I've mentioned, Ban Gu was interested in more than just history - he was an exceptional writer, being one of the four greats of Hanfu prose 汉赋四大家, as well as being a critical commentator of the classics of the time (he was the chief editor of the White Tiger Compendium 白虎通义, a collection of critical essays on the five classics).
And then comes my personal favourite - Chen Shou 陈寿, the author of Records of the Three Kingdoms 三国志. Chen Shou was born in Shu territory during the three kingdoms period, and was a avid reader, with exceptional talent and passion for history. He had worked well under Jiang Wei 姜维 for a time, but then lost favour when the eunuch Huang Hao 黄皓 came into power. After being recommended into the Jin court (after the fall of Shu), he would be promoted then demoted multiple times, mainly due to the fact that he refused to do anyone favours when writing his historical work.
Despite the frequent upheavals he suffered in court, he was nonetheless greatly praised by peers once he submitted the completed work of the records, most famously fellow historian Xiahou Zhan 夏侯湛 (a decedent of Xiahou Yuan) destroyed his own work on Wei's history when he saw how well written Chen Shou's version was.
This mostly covers the early Chinese historians (the area of study I have a personal interest in). Two later historians also covered this period of time - Fan Ye 范晔 and Sima Guang 司马光 writing the Book of Later Han 后汉书 and Comphrehensive Collection to Aid Governance 资治通鉴 resprectively - but I cannot be as confident in providing their personal history.