Chronic kidney disease appears worldwide. In the United States, the number of patients suffering from kidney failure doubled from 1998 to 2010. A common treatment for these patients is haemodialysis. However, the frequency of deaths caused by cardiovascular diseases is up to 10% to 30% higher in patients undergoing dialysis than in the general population. To analyse the underlying effects and for a possible risk prediction, a continuous monitoring of the ionic concentrations that are influenced by dialysis is desired. In this work, a method for the reconstruction of the ionic concentrations of calcium and potassium from the ECG is proposed. In a first step, 91 monodomain simulations with the ten Tusscher ventricular cell model were performed for different extracellular ionic concentrations. From there, a standard 12-lead ECG was extracted. Calcium and potassium changes yielded ECGs clearly differing in amplitude and morphology. In a second step, the simulated ECG signals were used for reconstructing the ionic concentrations directly from the ECG. Features were extracted from the signals designed to describe changes caused by varied ionic concentrations. The inverse problem, i.e. coming back from the ECG features to the ionic concentrations was solved by regression with an artificial neural network. Results for potassium estimation yield an error of 0.00±0.28 mmol/l (mean±standard deviation) calculated with 7-fold cross validation. The estimation error for calcium was 0.00±0.08 mmol/l. Although these results underline the suitability of the method, the used ECGs differed from the observed in a clinical environment. However, simulations allow an evaluation under controlled conditions of a particular effect that was intended to be investigated. As the application to clinical data is yet missing, this study can be seen as a proof of concept showing that an artificial neural network is capable of exactly estimating potassium and calcium concentrations from ECG features.