A strategy for non-target analysis of samples with unknown composition by capillary electrophoresis (CE) with ultraviolet (UV) detection is suggested. The strategy is based on the preliminary identification of analytes and further optimization of the conditions for their separation using the developed computational tool set ElphoSeparation. It is shown that, in order to record electrophoretic peaks with the mobilities from the maximum to minimum possible values, the positive and negative voltage polarity and hydrodynamic pressure should be used. To choose the optimal separation conditions, dynamic maps of electrophoretic separation (DMES) are suggested. DMES is a bar chart with theoretical resolutions of adjacent peaks presented in ascending order of the migration time. The resolution is calculated as the division of the difference of the effective electrophoretic mobilities of adjacent analytes by their average peak width in terms of electrophoretic mobility. The suggested strategy is tested by the example of the analysis of herbal medicine (Holosas) on the basis of rose hips. The approach should be used to analyze samples with not very complex composition, such as environmental water and precipitation samples, process liquors, some vegetable extracts, biological fluids, food, and other samples for the determination of widespread compounds capable of forming ionic species. For samples with complex composition, the approach used together with other techniques may produce advantageous information due to specificity of the method, particularly it can be useful for determination of compounds suffering from low volatility or thermal stability, and for analysis of samples with difficult matrices. Graphical Abstract The scheme of performing the non-target ionic analysis by capillary electrophoresis with ultraviolet detection.