The article examines the role of customs authorities in ensuring economic security, determines the nature of the impact of the digital economy on the specifics of the functions performed by customs authorities, and analyzes possible risks and challenges, as well as potential ways to neutralize them. In the current conditions of the intensive desire of states to make the rapid transition to the technologies of the V and VI technological structures, it is natural to form a set of elements of such a way of organizing economic relations as the digital economy. In this context, the impact of the developing components of the digital economy on the directions and specifics of the activities of not only private organizations, but also state bodies, including customs, is obvious. The article shows that in the context of the formation of the digital economy, customs authorities, being one of the subjects of ensuring the economic security of the state, continue to implement their main functions and tasks, while adjusting the used methods in the direction of an increasingly deep application of ICT. The general change in working methods caused by the development of the digital economy, as it was mentioned above, leads to the transformation of the chosen ways of solving the set tasks and performing the assigned functions, but does not affect their semantic essence.