How to nest a glowing cube inside a larger cube in and render using Cycles?
One object, one material solution



Overview

For this method to work you will need to use current Master branch of Blender 2.79 or 2.8. You can find them here: https://builder.blender.org/download/

This is because we will be using Bevel node for edge detection. Without it there are some workarounds in Blender 2.79b like for example using Bevel modifier and second material for bevels.

Nodes



Let's break it down to the most interesting parts.

Inner Cube

This is my dumb version of clipping vectors. What it does it basically using Color Ramps to clip axis vectors from left/right, top/bottom, and front/back to make smaller cube inside mesh. So two for X, Y and Z. You can tweak them in the same manner to get smaller or bigger cube. Those Color Ramps.

Volume Noise

It's noise. In Volume. Added to the Inner Cube. Nothing much here except that you will need to use grey color for one of the handles to make it darker than cube itself.

Edge Mask

This is why we need Master branch. We are using here Bevel node to detect edges and use it for mixing Glass with Emission.

Glass and Edge

Nothing fancy here. A bit optimized Glass shader and Emission for edges. Remember to use small Roughness value. I don't know if it's a bug or 'feature' but without it Master and 2.8 are going nuts with simple Glass.