Combine dashi, mirin, sake, soy sauce in a bowl or a liquid measuring cup.
Add sugar and mix all together until sugar is dissolved.
Thinly slice the onion and chop green onion. Beat egg in a small bowl.
Slice the chicken thigh diagonally and cut into 1.5" (4 cm) pieces.
Add the onion in a single layer. Pour roughly ⅓ to ½ of the seasonings mixture (depending on the size of your frying pan, the amount may vary). Pour just enough sauce to cover the onion and chicken.
Add half of the chicken on top of the onion. Make sure the onion and chicken are evenly distributed. Turn on the heat to medium heat and bring to a boil.
Once boiling, lower the heat to medium-low heat. Skim off any foam or scum if you see any. Cover and cook for about 5 minutes or until chicken is no longer pink and onion is tender.
Taste the broth and see if you need to adjust. Slowly and evenly drizzle the beaten egg over the chicken and onion. Cook covered on medium-low heat until the egg is done to your liking.
Add the green onion right before removing from the heat. Pour the chicken and egg on top of steamed rice and drizzle the desired amount of remaining sauce.