Is it safe to use voltage divider in battery undercharge?

Hi I wanted to use a voltage divider just to limit the Voltage output of the 12V lithium battery, using 2 pieces of 1k resistor, the output voltage will be around 6v. My question is is it safe to use voltage divider to the battery that is undercharge to power the arduino?

You can not use a 1K voltage divider to power an Arduino period, irrespective of if a battery is under charge or not. This is because the load you are taking out of the Arduino is way larger than the current down the resistor chain.

As a rule of thumb you need about 10 times more current down a resistor chain than the current you are drawing from it. So for an Arduino requiring about 40mA you need 400mA down the resistors. This means for 12V you need two 15R resistors. This is so wasteful of current no one would ever dream of doing this.

Having a 12v battery and 9v battery in parallel isn't a hot idea either.