Warning - Spoilers ahead.
I noticed that many people in the comments are wondering about 2 things:
1) What happened to Gisaeng and who is she?
2) What happened to the Second Prince.
This is my analysis.
1) The Gisaeng is most likely from the previous dynasty which was overthrown by the Emperor's father. He killed many innocents during that time. So our ML had banned them up together for revenge.
2) The Gisaeng helped the second prince to raise a rebellion while he was sitting inside the jail. She replaced all the guards so that he can get out and overthrow the king. The Epilogue shows that the crown prince (third prince) and the second prince fighting against each other.
3) In Ep 16 around 50th minute. The ML tells the FL that the second star has disappeared. Literally means that he predicts the death of the second prince. So now we know what will be the result of rebellion. ( Also he wasn't healed from his wound.. He was still in pain when he asks "Are we going to do it tonight"
I hope this provides an explanation to everyone who is wondering about the ending.